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

  • Users: pigna
  • Content: Threads
  • Order by date
  1. 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...
  2. 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...
  3. 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...
  4. 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