Sunday, April 19, 2009

16) Basic shell command to count number of fields in a file

Use the NF variable in awk

awk '{print NF}' 

No comments:

Post a Comment