Is there a way to use a exact match on the condition in awk?
This is what I have:
This catches '/anotherdirectory/example' too as it contains '/example'.
Is there a way to prevent this?
Thanks
This is what I have:
Code:
awk '$11 == "200" && index($9, "/example") {print $1}' /var/log/httpd-access.log | sort -n >> /tmp/ips.list
This catches '/anotherdirectory/example' too as it contains '/example'.
Is there a way to prevent this?
Thanks