LittleJack:
The ">" symbol tells the shell to pipe the output of the executed command (the stuff to the left) to the file named on the right.
$ ls
_README_MCM_ count_interrupts.cpp waitable_timer.cpp
change_interval.cpp measure_interval.cpp
$ grep c->detach *.cpp
$ ls
_README_MCM_ count_interrupts.cpp measure_interval.cpp
change_interval.cpp detach waitable_timer.cpp
So in this case, you'll want to either quote the string you're searching for, or escape any special symbol that the shell will treat differently.
The bit that surprised me is that you can put the filenames to search for on the right side of the '>' symbol, I was expecting a warning or something, but as you can see above, it worked just fine and I got the 'detach' file in the directory as you indicated.
...roboticus
When your only tool is a hammer, all problems look like your thumb. |