by minimax · 14y ago · 0 comments
awk -F ":" '{ if ( $3 != $4 ) print }' /etc/passwd
would be like this: awk -F ":" '$3 != $4 { print }' /etc/passwd
The first is obviously valid awk, but the second highlights awk's unique "pattern { action }" syntax. awk -F':' '$3 != $4' /etc/passwd `pattern action`
also idiomatic sed