- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- "findstrings" command
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
Forums
Discussions
Discussions
Discussions
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
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
04-27-2007 05:02 AM
04-27-2007 05:02 AM
RT
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2007 06:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2007 06:07 AM
04-27-2007 06:07 AM
Re: "findstrings" command
I think - without having tested - that the arguments of xargs are messed up.
Try with a header of
#!/usr/bin/sh -x
instead of
#!/bin/sh
and tell us the line of
find .. | xargs
I assume 'xargs -e grep' will use the grep argument for the '-e'-option and not call grep at all.
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2007 06:20 AM
04-27-2007 06:20 AM
Re: "findstrings" command
I've modified your script a bit. Please give the attached file a try.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2007 06:23 AM
04-27-2007 06:23 AM
Re: "findstrings" command
not really. it's just a front end to "grep"
that attempts to find similar-named "text" files and then process them.
If the "-v" option used to produce something like:
fname: match_result
fname1: match_result
while running w/o "-v" got a list of filenames only, the solution is:
at the top, set "L=-l" (that's a lower case "L"). currently its set to "minus one" which is why you get the argument error from grep.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2007 06:31 AM
04-27-2007 06:31 AM
Re: "findstrings" command
-v produces a list of matches w/o files
w/o -v you get list of filename w/ matching strings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2007 06:32 AM
04-27-2007 06:32 AM
Re: "findstrings" command
-v produces a list of matching strings only(w/o filename)
w/o -v you get list of filenames containg matches
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2007 06:35 AM
04-27-2007 06:35 AM
Re: "findstrings" command
...
L="-l"
...
while getopts iv OPT
do
...
v) L= # Verbose
...