The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 07-16-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
That will just display all lines in all files that do not contain "Dummy file".

Try this instead:


Code:
# list files that *do* contain "Dummy file" and save in a file
grep -l "Dummy file" * > /tmp/matches
# use that file to exclude them from the list of files
ls | grep -xvf /tmp/matches