Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. jkluesner

    line break every two fields

    Bingo. Thanks PH!
  2. jkluesner

    line break every two fields

    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...
  3. jkluesner

    line break every two fields

    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...
  4. jkluesner

    printing the line only when a value changes

    Hello all, I have a file reformated to finally look like this: 26 05 2008 2153 22 49.9985-107 52.0001 26 05 2008 2153 22 49.9985-107 52.0001 26 05 2008 2153 22 49.9985-107 52.0001 26 05 2008 2153 22 49.9986-107 52.0001 26 05 2008 2154 22 49.9985-107 52.0001 26 05...
  5. jkluesner

    checking # of digits in feild and adding zeros

    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...
  6. jkluesner

    usb storage Solaris 8 problems!!

    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...
  7. jkluesner

    remove after decimal place and switch fields

    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...
  8. jkluesner

    Reading only certian fields with substr and skipping the rest

    Never mind guys.....I got it. Just needed to add \n Thanks!
  9. jkluesner

    Reading only certian fields with substr and skipping the rest

    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"...
  10. jkluesner

    comparing values from different lines

    You are my hero!! It worked....that must have been it. Thanks!!!!!!
  11. jkluesner

    comparing values from different lines

    It does the same thing in both print to prompt and print to file
  12. jkluesner

    comparing values from different lines

    if I use a output file it looks like this: 05 09 2006 0627 26 59.9890-111 25.715 396 05 09 2006 0627 26 59.9790-111 25.696 397 05 09 2006 0627 26 59.9690-111 25.677 398 05 09 2006 0627 26 59.9580-111 25.657 399 05 09 2006 0628 26 59.9480-111 25.638 400 05...
  13. jkluesner

    comparing values from different lines

    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!
  14. jkluesner

    comparing values from different lines

    yes
  15. jkluesner

    comparing values from different lines

    0627 Thats all it prints
  16. jkluesner

    comparing values from different lines

    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...
  17. jkluesner

    comparing values from different lines

    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...
  18. jkluesner

    comparing values from different lines

    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
  19. jkluesner

    comparing values from different lines

    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!!
  20. jkluesner

    comparing values from different lines

    If it is a problem with my OS or version would somebody pls let me know.....Thanks!!

Part and Inventory Search

Back
Top