Re: Write to file from script

From: Equis (rhys_at_gallamda.net)
Date: 07/29/03


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 :-)



Relevant Pages

  • Re: Write to file from script
    ... > but does anyone know how to remove an entry with a script? ... If you want to delete lines that contain the sequence with the line, ... remove those characters. ...
    (alt.os.linux)
  • Marvel Encyclopedia
    ... Encyclopedia," a guide to the characters of the Marvel Comics ... Each entry is headed ... "Warlock" - the genetically engineered cosmic hero ADAM Warlock, ...
    (rec.arts.comics.marvel.universe)
  • Re: FWIW: ST Enterprise Cancelled
    ... > through the Guardian while they were playing with it. ... Where in any version of Ellison's script is this? ... LeBeque tells Beckwith that hes not going to keep doing ... >>will not do with their continuing characters and overall storyline, ...
    (sci.space.history)
  • Re: WORD doc info into FMP?
    ... it appears that each line of the entry follows the format ... number of any given type of field (Location, script, sets etc.) you might ... into a separate record in a database, and a separate related "database 2" ... Ten Nights in a Barroom (New York State Archives) ...
    (comp.databases.filemaker)
  • RE: Need some MySQL query help...
    ... attempting to run the script: ... passed to the database. ... passwd entry to the current database entry. ...
    (perl.dbi.users)