I had a question about grep.
If I grep for something in a file, the output shows me all the lines in which that 'something' is contained in.
Is there a way to also output all the lines in which that 'something' wasnt contained in.
Say I have a file with a bunch of names and I do:
grep scott names.txt > scottnames.txt
I would like for two files to get created. One in which shows all the lines in which scott is contained, and two, all the lines in which scott isnt contained in.
I know that I can do a grep -v scott names.txt, but is there a way to do both at the same time?
Thanks
