I need to list the files that do not match the search pattern:
Example:
cat file1
This is how it should work
cat file2
This is why I like Unix
grep -option? Unix * (or some other command)
returns file1
I need to list the files that do not match the search pattern:
Example:
cat file1
This is how it should work
cat file2
This is why I like Unix
grep -option? Unix * (or some other command)
returns file1
Please read our rules and note:
(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly.
I will close the duplicate thread.
I by ,istake submitted the thread under wrong forum and had no idea how to change the forum without creating a new thread.
man grep
grep -vl Unix *
I have used this command but it doesn't work
can you elaborate on the "it doesn't work" part, pls?
grep -c Unix * | nawk -F: '!$NF {print $1}'
It works pretty good..
Thanks