I am trying to remove the second occurance of the match. All the documentation I read says this is how you do it. For me it either is global or does not work. Is there a different way of doing this? Would awk be better?
This some relavent lines from my hosts.deny file: === snipit === ALL:125.206.122.49 ALL:211.94.73.199 ALL:213.215.228.250 ALL:213.215.228.250 ALL:211.94.73.199 ALL:211.94.73.199 ALL:71.213.9.247 === snipit === sed -e 's/ALL:211\.94\.73\.199//' /etc/hosts.deny results in the following: === snipit === ALL:125.206.122.49 ALL:213.215.228.250 ALL:213.215.228.250 ALL:71.213.9.247 === snipit === sed -e 's/ALL:211\.94\.73\.199//1' /etc/hosts.deny results in the following: === snipit === ALL:125.206.122.49 ALL:213.215.228.250 ALL:213.215.228.250 ALL:71.213.9.247 === snipit === sed -e 's/ALL:211\.94\.73\.199//2' /etc/hosts.deny results in the following: === snipit === ALL:125.206.122.49 ALL:211.94.73.199 ALL:213.215.228.250 ALL:213.215.228.250 ALL:211.94.73.199 ALL:211.94.73.199 ALL:71.213.9.247 === snipit === What am I doing wrong? How can I get the resulting empty line to be removed as well? -Daniel /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
