kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Deleting a line from a file
@ 2014-05-14 14:28 Saket Sinha
  2014-05-14 14:34 ` Bernd Petrovitsch
  0 siblings, 1 reply; 10+ messages in thread
From: Saket Sinha @ 2014-05-14 14:28 UTC (permalink / raw)
  To: kernelnewbies

Hi,

    I have a file that has entries for different absolute path on
separate lines. eg:
/opt/new1
/opt/new2

I need to delete an entry from this file for a given path, for which I
am using sed.

sed -i 's#^/opt/new1.*$##g' file_entries.txt

However this is leaving blank line in between, which I don't want.

Can someone help me to do this without leaving blank lines in between.

Regards,
Saket Sinha

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-05-15  8:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-14 14:28 Deleting a line from a file Saket Sinha
2014-05-14 14:34 ` Bernd Petrovitsch
2014-05-14 15:18   ` Valdis.Kletnieks at vt.edu
2014-05-15  7:55     ` Bernd Petrovitsch
2014-05-15  8:06       ` Valdis.Kletnieks at vt.edu
2014-05-14 15:57   ` Saket Sinha
2014-05-14 16:14     ` Valdis.Kletnieks at vt.edu
2014-05-14 16:43       ` Saket Sinha
2014-05-14 17:51         ` Valdis.Kletnieks at vt.edu
2014-05-15  7:53     ` Bernd Petrovitsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).