Daniel wrote: > I am trying to remove the second occurance of the match.
This seems like a better job for 'uniq', which will show only unique lines in a file. # sort hosts.deny | uniq > hosts.deny.new I typically run 'sort' before 'uniq' because it seems that uniq looks for repeated lines, and if you happen to have the same line in different places in the file it may not catch it as a duplicate. HTH, Jeff
pgpWsVSMg2O0t.pgp
Description: PGP signature
/* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
