Hi Guys,
I am using a BASH script to add users to an ACL in the squid.conf file. Basically the script searches for a string and adds a variable to the end of the string like this:
cat /etc/squid/squid.conf | awk "/INTERNET/{ $0=$0 " $UNAME" } {print} " > /tmp/sq.conf
mv /tmp/sq.conf /etc/squid/squid.conf
Now the problem is that there is more than one occurrence of the search string (INTERNET in this case). I want awk to stop after the first successful operation.
At the moment it is adding the user to the ACL and again where it finds 'INTERNET' in the http_access directive.
Thanks