awk -v x=0 'NF != 6 { ++x } END { print x, NR }' out.lst
This time we're passing awk an external variable. When you do this you have to tell awk what you're doing be prefixing the variable with -v. So we've initialized x to be equal to zero before actually starting our awk program.
Nenhum comentário:
Postar um comentário