"nawk if else if else" not working

ok, this is most probably going to sound like a stupid question to you, but I can't make it work and really don't know what I do wrong here even after reading quite a few nawk/awk help sites: $ echo -e "hey\nthis\nworld" | nawk '{ if ( $1 !~ /e/ ) { print $0; } else if ($1 !~ /o/ ) { print $0; } else { print "condition not mached"; } }' hey this world $ I'd prefer to have it on one line but also tried on multiple lines as seen in various examples: $ echo -e "hey\nthis\nworld" | nawk '{ if ( $1 !~ /e/ ) print $0; els...Read more