- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: How could I do this?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2005 12:57 PM
тАО08-31-2005 12:57 PM
example strings to search for:
'string 1 with spaces'
'string 2 with spaces'
'string 3 with spaces'
'string 4 with spaces'
'string 5 with spaces'
'string 6 with spaces'
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2005 01:11 PM
тАО08-31-2005 01:11 PM
Solution$ find /dirA /foo/dirB -name '*.cfg' -print
now find string: abc followed by any spaces
$ find /dirA -name '*.cfg' -print | \
egrep 'abc * |string2 *|string3 *'
now filter out anything I don't care for using egrep -v
$ find /dirA -name '*.cfg' -print | \
egrep 'abc * |string2 *|string3 *' \
egrep -v 'aa|bb|cc'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2005 05:32 PM
тАО08-31-2005 05:32 PM
Re: How could I do this?
egrep -vl "string1|string2" `find directories -name *.cfg -type f`
The -l option will list the filenames.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2005 05:57 PM
тАО08-31-2005 05:57 PM
Re: How could I do this?
find
or
find
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-01-2005 08:00 PM
тАО09-01-2005 08:00 PM
Re: How could I do this?
cat>/tmp/string_to_search<
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2005 03:18 PM
тАО09-04-2005 03:18 PM
Re: How could I do this?
find
you can know more by
#man xargs
Some things like Muthukumar
HTH