What I need to do is to extract one complete column (file size) from the output of ls -lS but while doing so in some rows I have a single space but in some other rows I have 2 or 3 spaces like some file sizes are different with 30 bytes 400 bytes and some 4000 bytes. So when I extract the output of ls using | cut -d ' ' -f5 i get the value which has only one space i.e. I get 4000 as output because 400 has 2 spaces seperated and 30 is 3 spaces separated. So how to get the file size column from the ls output?
I need to extract the Info from the RC column for the first 4 players of liverpool. The test code i have does the same,but can anyone show me a better way of doing it.I could do it easily with gawk -F"|" and print the respective column,but i need to do this in perl.
i use this script to get the time and date of back and fourth transactions for a particular execution id. I use a substr command on the 5th column to to cut the milli seconds off the time value. - otherwise the times would look like 08:30:04.235
I would like to make a file with all these data in one column, like
a1 a2 . .
[code]....
Can it be done with awk or some other command? Also, is it possible then do add another column in front of this one with numbers of the lines (for every previous column), like
Archive: /home/kishore/Desktop/wrar391.exe [/home/kishore/Desktop/wrar391.exe] End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. zipinfo: cannot find zipfile directory in one of /home/kishore/Desktop/wrar391.exe or /home/kishore/Desktop/wrar391.exe.zip, and cannot find /home/kishore/Desktop/wrar391.exe.ZIP, period.
i am not able to extract the files in ubuntu can you tell me when i click archieve manager i am getting this error and which software i have to download for the zip files to be extract in ubuntu
Im trying to extract the href of a <link> tag from a html page however as some links contain further preferences I seem to be unable to extract them, do you have any idea how I can write this: Link:
I recently downloaded vlc to my Linux OS distro Ubuntu 10.10. player, but am unable to skin it. I have dl'd several packages and they will not extract, even from root. Every time I attempt to extract the .vlt files from zip, I briefly see the extraction progress bar followed by this error: "An error occurred while extracting files."
I have not defined a user vimrc, OS is redhat 4.6 and after a search and replace the first column in the editor is highlighted yellow and it stays that way as I close and open vim. This is the /etc/vimrc that came on the system. anyone see a bug or a reason it would do that?
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" set fileencodings=utf-8,latin1 endif set nocompatible " Use Vim defaults (much better!)
1. when we run od command it displays octal values. But the first column will be always 000000. after that the actual file contents are displayed. Can anyone tell the meaning of that.
2. When we run ls -l command, in the first line of the output, we can see some integer value. What is the significance of that value.
this awk statement only returns the first line, and i cant seems to make it perform in a way to match based on keywords like GREP. Is there any way to make display the other lines which contains "google" also?
It is very important for my research work. For example mydata.txt: id type x y z 1 6 0.474611 0.227223 0.583947 2 4 0.422894 0.22726 0.536791 3 5 0.448963 0.200148 0.560336 4 3 0.386478 0.207721 0.515293 5 6 0.371617 0.22361 0.582206 6 4 0.32123 0.222999 0.534782
How to change second column (type) whose values are 4 and 3 to value 1, so that mydata.text file become: id type x y z 1 6 0.474611 0.227223 0.583947 2 1 0.422894 0.22726 0.536791 3 5 0.448963 0.200148 0.560336 4 1 0.386478 0.207721 0.515293 5 6 0.371617 0.22361 0.582206 6 1 0.32123 0.222999 0.534782
I need to replace a value in a file. For example the content of data.txt file is: 1 1 23 2 1 42 3 2 52 4 2 62 5 1 77 6 1 88 7 2 99 8 1 100
Could I substitute 2 in second column with 3 using awk and or sed or other command so that the data will be change as follow? 1 1 23 2 1 42 3 3 52 4 3 62 5 1 77 6 1 88 7 3 99 8 1 100
I was trying to redirect the output of two variables to different columns of a .csv file in MS excel like this,
Code: echo "$a $b" > abc.csv But I am getting both $a and $b in the same column, is there anything I can use instead of to move the value of $b to the next column? Or is there a good different approach to do it?
I have a text file and I need to replace the 3rd column of that file from row 3 to the end of the file with a column which I have stored in the different text file. For e.g the original file is like given below:
So lets say I wanna replace column 3 from row 3 to row 7 with a data from another file which is given below: 54.00 239.00 53.00 237.00 52.00 165.00 235.0
So the final output file should be like this: a.txt nobla 6 gadf 72.500 1.600 1.800 .850 5.250 8.540 A# rad ang ht prf bk sd dia type blade 1 0.3081 54.00 1.9235 -17.50 18.00 -3.00 0.6250 1613 1 2 0.6509 239.00 2.0316 -17.50 18.00 -3.00 0.6250 1613 4 3 1.0128 53.00 2.1457 -17.50 18.00 -3.00 0.6250 1616 1 4 1.3748 237.00 2.2598 -17.50 18.00 -3.00 0.6250 1616 4 5 1.6986 52.00 2.3619 -17.50 18.00 -3.00 0.6250 1616 1 6 1.9347 165.00 2.4364 -17.51 18.00 -3.00 0.6250 1616 5 7 2.1327 235.00 2.4988 -17.34 18.00 -3.00 0.6250 1616 4
And I will post the code whatever i have tried soon. I started with awk and cut commands..but never got it to work and also tried PASTE command too.
i wanna sort the 3rd column in a table numerically ( no actual borders...only tabs seperating the columns) it should be something like this but i cant get it right