May 15, 2014
7:55 a.m.
On Mit, 2014-05-14 at 11:18 -0400, Valdis.Kletnieks@vt.edu 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 : bernd@petrovitsch.priv.at LUGA : http://www.luga.at