You should look at the -v option in grep to exclude. You can pipe your existing output through that.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Danforth, Ken
Sent: Thursday, December 01, 2011 9:56 AM
To: midrange-l@xxxxxxxxxxxx
Subject: FIND and GREP
I need to generate a list of IFS files that contain a given string
("iim"). I need to search directory /linoma/goanywhere/projects
recursively. I've been able to do this with a combination of the FIND
and GREP commands in QSHELL:
find /linoma/goanywhere/userdata/projects -type f -exec grep -lRF "iim"
'{}' ';'
Here's the rub: there is a subdirectory I want to ignore
(/linoma/goanywhere/userdata/projects/demo). How would I modify my
find/grep statement to exclude the demo folder?
Ken Danforth
Applications Architect
Amscan, Inc.
80 Grasslands Rd
Elmsford, NY 10523
Voice: 914-784-4161
Fax: 914-784-8819
IMPORTANT NOTICE: This message is intended only for the addressee and may contain confidential, privileged information.
If you are not the intended recipient, you may not use, copy or disclose any information contained in the message.
If you have received this message in error, please notify the sender by reply e-mail and delete the message.
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.