Awk conditional how-to
i have need a line in my awk script that basically says "if this or this or this or this, then do nothing"
right now it checks for empty line
if ( NF == 0 ) {}
but i need to add some OR's in there, need to check if $0 contains a pattern.
can i do this
if ( NF == 0 || $0 ~ /foo/ || $0 ~ /abc123/ ) {}
Last edited by Linux_Kidd; 11-04-2011 at 09:31 AM.
|