[NTLUG:Discuss] Quickest way to edit file?

Daniel Hauck daniel at yacg.com
Mon Jul 23 10:09:08 CDT 2007


> I have a text file with several hundred lines, each with a single
> email address.  Occasionally I want to add or delete an address.
> Adding is easy:
> 
>    echo 'user at xyz.org' >> filename
> 
> What's the easiest way to delete a single line in a file?  I've been
> doing it easily enough using vi, but can I do it with a single
> command?
> 

Woo!  I don't know, but I'm guessing someone here knows right off the
top of his head (I'm betting Chris Cox comes up with the best answer)
but this is of good general interest.  I'll be saving the answer to this
problem for future use as you can bet it'll come in handy!



More information about the Discuss mailing list