Re: Search for string in files

2007-09-25 Thread William Pursell
Johannes Tax wrote: I'm trying to figure out how to find a certain string inside a bunch of files. If I, for examples, look for a certain function in a large source tree, I could do cat `find . -name '*.c'` | grep 'a_certain_function' but this seems quite awkward, furthermore it doesn't help

Re: Search for string in files

2007-08-27 Thread Bob McGowan
Mike Bird wrote: On Saturday 25 August 2007 14:34, Johannes Tax wrote: On [Sat, 25.08.2007 13:15], Mike Bird wrote: grep -l 'a_certain_function' $(find . -name '*.c') That's exactly what I need. It also shows that I have to investigate the grep command a little bit further ... BTW, unlike

Re: Search for string in files

2007-08-26 Thread Jon Leonard
On Sun, Aug 26, 2007 at 07:46:01AM +0200, Jonathan Kaye wrote: Johannes Tax wrote: Hi, I'm trying to figure out how to find a certain string inside a bunch of files. If I, for examples, look for a certain function in a large source tree, I could do cat `find . -name '*.c'` |

Search for string in files

2007-08-25 Thread Johannes Tax
Hi, I'm trying to figure out how to find a certain string inside a bunch of files. If I, for examples, look for a certain function in a large source tree, I could do cat `find . -name '*.c'` | grep 'a_certain_function' but this seems quite awkward, furthermore it doesn't help that much because

Re: Search for string in files

2007-08-25 Thread Mike Bird
On Saturday 25 August 2007 14:16, Johannes Tax wrote: I'm trying to figure out how to find a certain string inside a bunch of files. If I, for examples, look for a certain function in a large source tree, I could do cat `find . -name '*.c'` | grep 'a_certain_function' but this seems quite

Re: Search for string in files

2007-08-25 Thread Mathias Brodala
Hi Johannes. Johannes Tax, 25.08.2007 23:16: I'm trying to figure out how to find a certain string inside a bunch of files. If I, for examples, look for a certain function in a large source tree, I could do cat `find . -name '*.c'` | grep 'a_certain_function' but this seems quite

Re: Search for string in files

2007-08-25 Thread Johannes Tax
On [Sat, 25.08.2007 13:15], Mike Bird wrote: cat `find . -name '*.c'` | grep 'a_certain_function' but this seems quite awkward, furthermore it doesn't help that much because I don't know in which file the string was found. Maybe there's a tool that makes it possible to find a string in a

Re: Search for string in files

2007-08-25 Thread Jeff D
On Sat, 25 Aug 2007, Johannes Tax wrote: Hi, I'm trying to figure out how to find a certain string inside a bunch of files. If I, for examples, look for a certain function in a large source tree, I could do cat `find . -name '*.c'` | grep 'a_certain_function' but this seems quite awkward,

Re: Search for string in files

2007-08-25 Thread Ken Irving
On Sat, Aug 25, 2007 at 11:16:37PM +0200, Johannes Tax wrote: Hi, I'm trying to figure out how to find a certain string inside a bunch of files. If I, for examples, look for a certain function in a large source tree, I could do cat `find . -name '*.c'` | grep 'a_certain_function' but

Re: Search for string in files

2007-08-25 Thread Mike Bird
On Saturday 25 August 2007 14:34, Johannes Tax wrote: On [Sat, 25.08.2007 13:15], Mike Bird wrote: grep -l 'a_certain_function' $(find . -name '*.c') That's exactly what I need. It also shows that I have to investigate the grep command a little bit further ... BTW, unlike backquote,

Search for string in files

2007-08-25 Thread Johannes Tax
Hi, I'm trying to figure out how to find a certain string inside a bunch of files. If I, for examples, look for a certain function in a large source tree, I could do cat `find . -name '*.c'` | grep 'a_certain_function' but this seems quite awkward, furthermore it doesn't help that much because

Re: Search for string in files

2007-08-25 Thread Neil Gunton
Johannes Tax wrote: Hi, I'm trying to figure out how to find a certain string inside a bunch of files. If I, for examples, look for a certain function in a large source tree, I could do cat `find . -name '*.c'` | grep 'a_certain_function' but this seems quite awkward, furthermore it doesn't

Re: Search for string in files

2007-08-25 Thread - Tong -
On Sat, 25 Aug 2007 17:37:05 -0500, Neil Gunton wrote: I'm trying to figure out how to find a certain string inside a bunch of files. If I, for examples, look for a certain function in a large source tree, I could do cat `find . -name '*.c'` | grep 'a_certain_function' but this seems

Re: Search for string in files

2007-08-25 Thread Jonathan Kaye
Johannes Tax wrote: Hi, I'm trying to figure out how to find a certain string inside a bunch of files. If I, for examples, look for a certain function in a large source tree, I could do cat `find . -name '*.c'` | grep 'a_certain_function' but this seems quite awkward, furthermore it