On Mit, 2014-05-14 at 11:18 -0400, [email protected] wrote:
> On Wed, 14 May 2014 16:34:20 +0200, Bernd Petrovitsch said:
>
> > sed -i 's#^/opt/new1.*$#d' file_entries.txt
>
> You don't even need the leading 's'. Just /pattern/d is sufficient.
Ooops, yes, thanks. So
sed -i '/\/opt\/new1/d' file_entries.txt
should do it.
Just for the match, we do not need, the tailing ".*$" (because it
matches always). But we need /../,
so just quote the "/" in the path.
The "d" tells "sed" to delete the current line.
Bernd
--
Bernd Petrovitsch Email : [email protected]
LUGA : http://www.luga.at
_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies