Re: Write to file from script
From: Equis (rhys_at_gallamda.net)
Date: 07/29/03
- Next message: Richard Steiner: "Re: Is C/C++ dead? C# and .NET the future?"
- Previous message: Sybren Stuvel: "Re: root control in Knoppix"
- In reply to: Jeremia d.: "Re: Write to file from script"
- Next in thread: Silvan: "Re: Write to file from script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 29 Jul 2003 10:17:45 +1000
"Jeremia d." <h0e@penguin-security.com> wrote in message
news:pan.2003.07.28.07.05.19.787091@penguin-security.com...
> On Mon, 28 Jul 2003 16:46:19 +1000, Equis wrote:
>
> > Hello,
> >
> > I know how to output/add to a file from script "echo MyText >>MyFile"
> > but does anyone know how to remove an entry with a script?
>
> sed -e '/^line to remove here or variable$/D' file > file.new
> mv file.new file
>
> The '^' and '$' make sure that the line is matched exactly.
> If you want to delete lines that contain the sequence with the line,
> remove those characters.
Thank You Very Much.
I will look into it :-)
- Next message: Richard Steiner: "Re: Is C/C++ dead? C# and .NET the future?"
- Previous message: Sybren Stuvel: "Re: root control in Knoppix"
- In reply to: Jeremia d.: "Re: Write to file from script"
- Next in thread: Silvan: "Re: Write to file from script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|