[kwlug-disc] comment matching lines in multiple files
richard at weait.com
Sun Sep 20 16:05:11 EDT 2009
On Sun, Sep 20, 2009 at 4:04 PM, Richard Weait <richard at weait.com> wrote:
> Dear Lazyweb,
> I have many files, some have lines containing "foobar" in the line
> somewhere. I want to comment every line that contains "foobar" with a
> leading "#". From bash.
> I'm presuming that there are bash, awk, find, sed and perl one liners for this.
Solution with the least line noise wins. So I guess perl is out. ;-)
More information about the kwlug-disc