Chris Norman wrote: > I am writing a bash script. Part of the script involves deleting one > line of a file, which will be located anywhere in the file. cat | grep -i "" >temp-file> mv The above does an inverse grep, displaying everything BUT the line of text you specify, and redirects the output to a temp file. Then it moves the newly created temp file onto the original file, overwriting the original. The sed equivalent would probably be: cat | sed 's///' > If you want to remove more than one line with matching text, add the 'global' modifier to it: cat | sed 's///g' > Boning up on 'Regular Expressions' will help in this regard. HTH, Michael