🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.tech.unix
Article #372

Re: help

#372
From: Richard Howlett
Date: Fri, 07 Apr 2000 00:00
18 lines
1084 bytes
David wrote:
> 
> Hey everyone,
> 
> I'm writing a script file and need to know how to remove a specific line of
> text from a .txt file.
> 
> I can use        grep $variable filename        to get it but how can I
> remove that line?

grep -v $variable filename >newfilename

will remove the line and put the remaining lines in newfilename

-- 
Richard Howlett

mailto:richard@howie.org.uk
Technical Details
Message-ID: <38EE61EA.D4564A74@NOSPAM-howie.org.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <K8sH4.767$5D.1658@ozemail.com.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fac57,a69137bb0b34a75d,start
X-Google-Attributes: gidfac57,public
From: Richard Howlett <richard@NOSPAM-howie.org.uk>
Subject: Re: help
Date: 2000/04/07
Message-ID: <38EE61EA.D4564A74@NOSPAM-howie.org.uk>
X-Deja-AN: 608208927
Content-Transfer-Encoding: 7bit
X-NNTP-Posting-Host: rhowlett.demon.co.uk:212.228.247.39
References: <K8sH4.767$5D.1658@ozemail.com.au>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@demon.net
X-Trace: news.demon.co.uk 955154426 nnrp-10:6405 NO-IDENT rhowlett.demon.co.uk:212.228.247.39
MIME-Version: 1.0
Newsgroups: demon.tech.unix