5
votes
1answer
369 views

How can I perform a second grep on the files returned from a previous grep?

I often find myself searching through a bunch of code using grep in order to pin down what I'm looking for. Sometimes I get a list of files a little longer than I hoped. At this point I want to ...
7
votes
1answer
4k views

How can I grep with color in Mac OS X's terminal?

I recently found that on Mac OS X I can set this up in my shell ~/.profile so that when I use grep it will print the matches in color (white one red). alias grep='GREP_COLOR="1;37;41" LANG=C grep ...
0
votes
1answer
675 views

Using grep to move files, Mac

I want to do a search using grep inside all the files of a directory for the pattern '@mail.ru>' (to clean up a mess from a spammer). Using Mac OS X's command line, which should be similar to most ...
0
votes
3answers
874 views

Mac OS X Terminal: Search output of another command with grep

I am trying to get the output of an ls command and search that list for a regex expression... Effectively, it will search every file name in the folder for the regex expression. I put together a ...
6
votes
4answers
8k views

Mac OS X search and replace tool with regular expression support

I'm looking for a regular expression based search/replace GUI tool that is able to handle multiple files/subdirectories, something like grepWin but for Mac OS X. PS. I'm aware of grep and I don't ...
9
votes
9answers
6k views

grep all .java files in a directory for a particular string

How would I search all .java files for a simple string (not a regex) in the current directory and all sub-directories on Mac OS X? I just want to print a list of file and directory names that match.