awk '/findme/' <>
awk '!/shitty/' <> awk '/foo/{print FNR,$0}' <>
awk 'length($0)>80{print FNR,$0}' <>
awk 'length < 80
awk '1; { print "" }' <>
awk '{ print FNR "\t" $0 }' awk '{ printf("%5d : %s\n", NR, $0) }'
awk 'NF { $0=++a " :" $0 }; { print }'
awk '/foo/{i=5+1;}{if(i){i--; print;}}'
awk '/server {/,/}/'
awk -F' ' '{print "ip:\t" $2 "\n port:\t" $3'
awk 'NF > 0'
awk NF
awk '{sub(/[ \t]*$/, "");print}'
awk '{sub(/^[ \t]+/, ""); print}'
awk 'a !~ $0{print}; {a=$0}'
awk '!x[$0]++'
awk '{$1=$3=""}1'
awk '/regexp/{gsub(/foo/, "bar")};{print}'
awk '/regexp/{sub(/^/, "++++"); print;next;}{print}'
awk '/'$(date -d "1 hours ago" "+%d\/%b\/%Y:%H:%M")'/,/'$(date "+%d\/%b\/%Y:%H:%M")'/ { print $0 }'
/var/log/httpd/access_log
Select lines in a csv file based on text comparison
awk -F ',' '$5 ~ /baddomain.com/' FILE
Print specific fields of a csv file
awf -F '|' '{print $3" "$4} FILE
Tab separated files:
awk -F $'\t' ...