Help - Search - Members - Calendar
Full Version: Inverse Of Echo?
Linuxhelp > Support > Technical Support
Jim
hey, does anybody know a command that can remove lines from a file kind of like how echo works but in reverse? Just trying to write a sript and I am comming up short. Thanks.
michaelk
sed can selectively delete lines from a file. Something like

sed -e "/matching text/d" filename
Jim
Half way there, but that didn't seem to do exactly what I want. It did manage to delete the line, but not from the actual file.

I am trying to figure out a way to use it though using someting like xargs, but hummm.

Any ideas?
DS2K3
Could you clear the file, and then re-echo the modified text?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.