Search code examples
scriptingcshtcsh

Selecting records with N fields from a file


can somebody help me, how can I filter my file, inside the file I have rows with 3, 4, 5 elements, I want print using echo only these which have 5 elements, thanks in advance (I'm talkin about scripts)


Solution

  • cat $file | awk '(NF==5) { print $0}'