Results 1 to 3 of 3
Hi,
i'm trying to make a script that finds all the files in /usr/share/app-install with 'beagle' in the filename
and then i need to get the lines where an empty ...
- 06-11-2009 #1Just Joined!
- Join Date
- Jun 2009
- Posts
- 1
find & grep multiple files
Hi,
i'm trying to make a script that finds all the files in /usr/share/app-install with 'beagle' in the filename
and then i need to get the lines where an empty space followed by a " appears
Now i got some parts, but can't put it together:
thanks in advance!Code:find /usr/share/app/install -iname *beagle* -exec grep * \"* -H {} \;
--- edit
i managed to get the following working with a friend:
but it doesn't work on my computer?Code:find /usr/share/app-install -name *beagle* -exec grep ' \”' {} \;
- 06-11-2009 #2Linux User
- Join Date
- Jan 2007
- Location
- cleveland
- Posts
- 452
welcome to the forum
> app-install
> app/install
note inconsistent usage.
I found this to work pretty good:
cd /usr/share/app-install
find . -name *beagle* -exec grep ' \"' -H {} \;
note the space between "'" and "\"the sun is new every day (heraclitus)
- 06-11-2009 #3Linux User
- Join Date
- May 2008
- Location
- NYC, moved from KS & MO
- Posts
- 251
Why do you need command find? As you can simply do a
cd /usr/share/app-install
grep -r ' \"' *beagle*
The -H option is omitted here as grep will use -H by default when you search in multiple files. The -r option enables recursive search under /usr/share/app-install.


Reply With Quote