172.68.10.245 - - [16/Dec/2020:06:38:03 +0000] "GET /basket/add/36994 HTTP/1.1" 404 314 "http://site.ru/basket/add/36994" "Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like G$
172.68.10.221 - - [16/Dec/2020:06:38:04 +0000] "GET /media/chain/rostelekom.png HTTP/1.1" 304 182 "https://firstmagazin.ru/moskva/tele2" "Mozilla/5.0 (Linux; Android 9; MI 6) AppleWebKit/537.36
172.68.11.72 - - [16/Dec/2020:06:38:08 +0000] "GET /chita/letual/103051 HTTP/1.1" 200 7852 "-" "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)"
172.68.11.60 - - [16/Dec/2020:06:38:09 +0000] "GET /kola/pikpoint/110562 HTTP/1.1" 200 6730 "-" "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)"
grep "(?:(?!.*?bots.*)172\.68.*|abab)" access_f.log
I'm trying to filter logs file that have an ip mask "172.168." but no substring "bots".
grep error:
-bash: !.bots.: event not found
How best to solve this problem?