On Thu, 15 May 2014 09:55:52 +0200, Bernd Petrovitsch said:

> 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).

Actually, you want to use /^\/opt\/new1[ \t]/d because otherwise it will
also delete lines that contain   /usr/opt/new1   and /opt/new12.

So you want a pattern that matches ^ anchor at start, the actual
/opt/new1 pathname, and then either a blank or tab whitespace....

Attachment: pgptHt0An8Adt.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to