![]() |
grep to NOT select a word
Howdy All!
How can I write a regular expression that will exclude a whole word. Here is what I have now: ls -a | grep "^[^\.]" This lists out all files in the directory and removes all file names that begin with a destop. I then want to weed one other: a file called "Desktop". Can I use grep to select everything NOT "Desktop"? Thanks for any advice! Rob :) |
grep -v pattern
|
Thank you.. errr.. Dark Helmet. :)
I shall check the man better next time! Rob :) |
| All times are GMT -5. The time now is 06:06 PM. |