Mike Hornsby <[log in to unmask]> wrote:
>It turns out that in this case the hard way is not too hard:) If you place
>the following commands in a file called SEARCH, and this file is in your
>current path, then you can easily search a directory structure for all files
>containing a specific string. (note:the grep parms are -IL in lower case)
>If the group is too large you may get a *Segmentation violation* but
>otherwise this works ok. BTW, I get the same error if I use the Find command
>first then piped to Grep:(
I had a similar issue 2 years ago with feeding a mondo-number of filenames
into a command triggering the dreaded Segmentation Violation, and was told
by the RC to use xargs to split it up. :-(
Kills performance, but...
>parm SrchString,SrchFiles
>purge shellin,temp >$null
>echo grep -il '!SrchString' !SrchFiles >shellin
...replace this line with
echo "ls !SrchFiles | xargs -i grep -il '!SrchString' {} \;" >shellin
and you *should* avoid the dreaded error.
>echo exit >>shellin
>xeq sh.hpbin.sys <shellin
HTH,
Mike, coming up on his Silver Anniversary with MPE...
--
Mike Reaser, Atlanta, GA, USA EverCrack Widower & Occasional Roageek
ICQ 36141307 If it's there, remove the YOUKNOW to, well, you know
"Ignorance" is as much a method of computer security as "Hope" is
a method of birth control. -- K. Ward & L. N. Joynes, c. 1986
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|