...making Linux just a little more fun!
Smile Maker [britto_can at yahoo.com]
Folks:
I need to do the following stuff:
Find the particular string in a file and remove that line which has that particular string from the file , that should be done from the command line or from the script.
Thanx... Britto
Kapil Hari Paranjape [kapil at imsc.res.in]
Hello,
On Fri, 01 Jun 2007, Smile Maker wrote:
> Find the particular string in a file and remove that line which has > that particular string from the file , that should be done from the > command line or from the script.
Read all about it:
man sedIn particular:
sed -e'/REGEX_PATTERN/d' < input_file > output_fileNote that input_file and output_file need to be different.
Regards,
Kapil. --
Smile Maker [britto_can at yahoo.com]
Thanks Kapil and Neil
-- Britto
Neil Youngman [ny at youngman.org.uk]
On or around Friday 01 June 2007 09:19, Smile Maker reorganised a bunch of electrons to form the message:
> Folks: > > I need to do the following stuff: > > Find the particular string in a file and remove that line which has that > particular string from the file , that should be done from the command line > or from the script.
Sounds like a homework question and we don't do people's homework for them.
I will give you a hint. Read the man page for grep.
Neil Youngman