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