3

Help with awk trim

view full story
linux-howto

http://www.unix.com – I am trying to trim spaces for the fixed width file starting from location 129 and of length 20. I am expecting only around 40 records that will have length greater than 9. But i am getting around 4000 records. Please help me correct the following. Code: nawk '{if (a=length(gsub(/ */,"",substr($0,129,20)))>9); print $a }' testfile |wc -l (HowTos)