|
Thanks got it.......... On 11/10/06, Alfredo Delgado <adelgado@xxxxxxxxxxxxxxxxx> wrote:
I'm not seeing an option on grep for fullpath in qsh so I came up with this: find /home/t2web/includes/##usr -exec grep -l 'abcdef' {} ';' Leave off the trailing / on your starting path of you'll get /home/t2web/includes/##usr//foo/bar/file.txt YMMV, there may be a more elegant way to do it. Thanks, Alfred Alfredo Delgado wrote: >You can pass a recursive switch like: grep -r 'abcdef' >/home/t2web/includes/##usr/* > >However, if you just want the filenames you can use: grep -lr 'abcdef' >/home/t2web/includes/##usr/* > >Thanks, >Alfred > >Mark Allen wrote: > > > >>I have a need to search a directory for any files containing a specific >>string (example below) >> >>grep 'abcdef' /home/t2web/includes/##usr/*.* >> >>This works fine EXCEPT it doesn't search any of the subdirectories (and then >>any subdirs under those subdirs, etc.----> DON"T ASK WHY) >> >>Newbie at this and quick search did not show (or at least I didn't see it) >>but is there a switch or another parm that I could add so that it would do >>the subdirs... >> >> -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.