[ale] Shell scripting

Pete Hardie pete.hardie at sciatl.com
Mon Feb 10 08:35:19 EST 2003


Thomas Holmquist wrote:
> Im writing a shell script that will put unique lines of text in a file
> 
> then I want to be able to delete the lines of text that contain a certan 
> keyword, how would I do this?

sort -u <file> | fgrep -v <keyword> > output.txt

the sort will remove any duplicate lines (it may reorder them, too, I have not
tested that part in a while), and the fgrep -v will exclude lines with the keyword.





-- 
Pete Hardie                   |   Goalie, DVSG Dart Team
     posting from, but not     |
	speaking for:             |
Scientific Atlanta, Digital Video Services Group



     - - - - - - -  Appended by Scientific-Atlanta, Inc.  - - - - - - -  
This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer. 

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale






More information about the Ale mailing list