On 2009-05-30 00:11, Darren Weber wrote:
> An example of how to remove a line with some search text in it. Assume
> tmp.txt contains:
>
> # BEGIN (not in file)
> abc
> def
> # END (not in file)
>
> reinplace {$!N;s|^.*abc.*\\n||g} tmp.txt
Easier sed syntax to remove a line would be:
reinplace {/^.*abc.*/d} tmp.txt
Rainer
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
