awk match pattern in column
Grep only 502 && 503:
cat /var/log/nginx/access.log| awk '$9 ~ /^50[23]/'
Grep all 50X:
cat /var/log/nginx/access.log| awk '$9 ~ /^50./'
awk match pattern in column
Grep only 502 && 503:
cat /var/log/nginx/access.log| awk '$9 ~ /^50[23]/'
Grep all 50X:
cat /var/log/nginx/access.log| awk '$9 ~ /^50./'