Home > IT > awk with 2 FS or more

awk with 2 FS or more

October 13, 2008

awk ‘BEGIN {FS=”[ %\t%:]+”;} {print $0}’

Ex:

top -b -d 1 | grep ^Cpu | awk ‘BEGIN {FS=”[ %\t]+”;} {print $2}’

Categories: IT Tags: ,
%d bloggers like this: