Results 1 to 3 of 3
I am trying to run this command but wish to modify it so it outputs files that contain both 'quality=x' and 'quality=vg'. Not just 'quality=x'. how do I modify it ...
- 02-15-2007 #1Just Joined!
- Join Date
- Feb 2007
- Posts
- 9
finding certain text within a document - command line query
I am trying to run this command but wish to modify it so it outputs files that contain both 'quality=x' and 'quality=vg'. Not just 'quality=x'. how do I modify it so it works
find . -name \*.meta | xargs grep "^quality=x" | cut -d : -f 1 > /tmp/test
if its any clearer this is what I want it to do...
find . -name \*.meta | xargs grep "^quality=x" OR "^quality=vg" | cut -d : -f 1 > /tmp/test
- 02-15-2007 #2
- 02-17-2007 #3Just Joined!
- Join Date
- Feb 2007
- Posts
- 41
Running xargs here is redundant as you can use the -exec option of find.
Code:find . -name '*.meta' -type f -exec egrep '^quality=x|^quality=vg' {} \; | cut -d : -f 1


Reply With Quote