I have this so far:
awk '{for(i=1;i<NF;i++)if(i%2==0){$i=$i"\n"} }1' U1414_velocity_function.txt
However my output looks like this:
0 1538
10 1539
20 1537
30 1533
40 1529
50 1523
60 1519
70 1516
80 1513
etc...
I am not sure why it is adding a space on the 2nd, 3rd, and 4th rows of...
Hello all,
I know this is a simple question, however I haven't used awk in over a year and am having memory issues... (must be that I turned 30 last week).
Anyway, I want to take a txt file with 8 fields on one line and add line breaks every two fields. For example the file looks like this...
Hello all,
I am trying to edit some ship gps data and I am having a problem with getting the hour/minute gmt time in the format I need. This is how far I have been able to get the data:
02 05 2008 13 59 22.53617615 -106.69877400
02 05 2008 13 59 22.53617619 -106.69877400
02 05 2008 13 59...
Hello all,
I have been trying for the past week to mount a 2 TB usb storage device that I built (VENUS box with 4x 500 gb). It shows up when I type
cd /dev/rdsk
ls -l c*0 | grep usb
I then tried to mount it with this command (vold turned off)
mount -F pcfs /dev/dsk/c4t0d0s0:c /mnt
it says...
Hello all,
I am needing to take a data set (see below) and delete the decimal digits on the second field and then switch the two fields.
Thanks!!
2.53993 6.65588
2.53591 43.4191
2.53671 63.2147
2.54153 94.3221
2.54876 136.741
2.55117 153.709
2.56000 184.816
2.56401 238.547
2.56722...
Hello agian,
Thanks for the help on my last question. Ok, I have a printf statement that reads certian feilds using substr. I use this because the raw data has no spaces or commas....just a bunch of numbers. This is the printf I use:
#!/usr/bin/awk -f
{
printf "%s %s %s %s%s %s%s"...
I want to print the lines that are the first in each minute. I want to skip the repeats. In the first post you can see the repeat in minutes. I do not want any repeats.
Thanks!
PHV,
I didn't work in either gawk or awk. I have tried both. Does the |4 have a special meaning in gawk.....it doesn't matter right?...just a variable name? Anyway if I change the variable name to whatever it still gives me the same output. The file it makes looks like the input file....no...
Yeah......feherke that didn't work either. It just printed the last line in the file. I installed gawk thinking it is a problem with my version of gawk....no luck still the same results using gawk. All I need is a simple filter I can't seem to get it...ahhhh!!! Thanks for all the help guys...
I can....this is just how I built it step by step. Any suggestion on calling a perl script with a shell script and setting input/output files with perl.
Thanks
I do not know perl. I am assuming that I creat a .txt file with this code and then I am not sure how to call it in my shell script or how to set a input/output file. Thanks again for the help!!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.