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 gkittelson 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: *

  • Users: pigna
  • Order by date
  1. pigna

    print every nth line (sed or awk solution?)

    Thanks a lot that is already doing it. How simple can it be :)
  2. pigna

    print every nth line (sed or awk solution?)

    To clarify. Depending on the filesize I need to read every n th row. The bigger the file the larger the number of lines I want to skip...
  3. pigna

    print every nth line (sed or awk solution?)

    Trying to print every nth line of a huge file. Normally when using gsed one can use sed -n '3~7p' to print every 7th row starting from the 3th one. Working on AIX teh syntax sed -n '3,${p;n;n;n;n;n;n;}' is needed. However the problem is my file is to big so the param $p;n...... is becoming to...
  4. pigna

    Run on commandline but not in batch script (windows)

    To explain my question I build a small testcase. I have a command that seems to run fine when executed on commandline in windows: C:\Tools\gawk>echo Hello World|gawk "{ for (i = 1; i <= NF ; i++) printf \"%s\t\", substr($i,1,7); }" Hello World However when I do run it in a cmd file it goes...
  5. pigna

    strftime when not using gawk

    My mistake. I didn't know the Solaris box had multiple versions of awk installed. Using nawk made my last question obsolete. Thanks all for your quick support!!
  6. pigna

    strftime when not using gawk

    Damn I was too excited yesterday when experimenting on my test system. It seems the prod system has the very basic awk and that one does not alow for "command" | getline syntax. (seems only supported by NAWK and GAWK). Guess that means: not possible in this version?
  7. pigna

    strftime when not using gawk

    That did it super !! Thank you ...
  8. pigna

    strftime when not using gawk

    Thanks for your quick reply Feherke! As far as I can see the difference between the two is that the original version updates the timestamp per record. The 2nd has a fixed timestamp...
  9. pigna

    strftime when not using gawk

    I have this command running on Linux : vmstat 30|awk '{now=strftime("%Y%m%d %T"); print now $0}' But on Solaris I obviously don't have strftime. Any options or custom function to create same behaviour...
  10. pigna

    swap columns and it's column values

    A certain progam provides a column based output but column order is different for systems/versions. Simplefied something like this: System A: ColB ColA ColC ColD 1 4 1 1 2 2 5 4 1 3 0 1 System B: ColD ColB ColA...

Part and Inventory Search

Back
Top