|
|
Invisible wrote:
> No, I mean... I thought grep can only search within a single file (as
> can any decent text editor). I didn't realise it can search multiple
> files.
>
> (I'm still having trouble thinking up a use-case for that. About the
> only thing I can think of is trying to find out which header file
> defines a particular symbol or something.)
Yesterday, the 'parted' tool was giving me a totally cryptic error message.
$ apt-get source parted
$ cd parted-2.2
$ grep -rn "error message here" .
-r makes search recursive, -n makes grep output line numbers next to the
filenames. Then I opened a text editor on the file and line number that grep
mentioned, and tried to figure out the code :)
Post a reply to this message
|
|