Hi all,
I'm trying to hash out certain entries in socks.conf files on a few unix boxes .. I thought a simple script that would go to each box, check the file for any entries that had the following type string: sockd @=blah.at.me 0.0.0.0 0.0.0.0 eq whatever and would then pop a hash in the front.
I thought it would be simple ;-)
I tried the following approach:
sed 's/^sockd \(.*\) 0.0.0.0 0.0.0.0/#sockd 0.0.0.0 0.0.0.0/' socks.conf
Obviously the problem is the replaced text excludes the wildcard stuff that I need.
In the above sample each box would have a different domain name where the (.*\) is .. this still needs to be there.
Any clues as to what approach I should take here?
Thanks .. TJ
I'm trying to hash out certain entries in socks.conf files on a few unix boxes .. I thought a simple script that would go to each box, check the file for any entries that had the following type string: sockd @=blah.at.me 0.0.0.0 0.0.0.0 eq whatever and would then pop a hash in the front.
I thought it would be simple ;-)
I tried the following approach:
sed 's/^sockd \(.*\) 0.0.0.0 0.0.0.0/#sockd 0.0.0.0 0.0.0.0/' socks.conf
Obviously the problem is the replaced text excludes the wildcard stuff that I need.
In the above sample each box would have a different domain name where the (.*\) is .. this still needs to be there.
Any clues as to what approach I should take here?
Thanks .. TJ