Subject: | |
From: | |
Reply To: | Simonsen, Larry |
Date: | Wed, 26 Jan 2000 10:00:37 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Is there a way of using pipes and the echo command to do the grep command?
-------------------------------------------------
Larry Simonsen Phone: 801-489-2450
Flowserve Corporation Fax: 801-491-1750
PO Box 2200 http://www.Flowserve.com
Springville, UT 84663 e-mail: [log in to unmask]
-------------------------------------------------
All opinions expressed herein are my own and reflect, in no way, those of my
employer.
-----Original Message-----
From: Andreas Schmidt [mailto:[log in to unmask]]
Sent: Wednesday, January 26, 2000 9:51 AM
To: [log in to unmask]
Subject: Re: posix shell fileset
Folks,
I tried the same and got a more verbose error:
XENBH2: /APPLSTAT/PUB [136] > grep -i "9912" ../*RPRT*/*
grep: cannot execute: Arg list too long
But if I restrict it to one group I get it:
XENBH2: /APPLSTAT/PUB [139] > grep -i "9912" ../*RPRT9912*/*
../RPRT9912/APPLDET:Report APPLDET 9912 Monthly report for CD
on 10/01/00
../RPRT9912/APPLDET:Report APPLDET 9912 Monthly report for CM
on 10/01/00
../RPRT9912/APPLDET:Report APPLDET 9912 Monthly report for DV
on 10/01/00
../RPRT9912/APPLDET:Report APPLDET 9912 Monthly report for ED
on 10/01/00
../RPRT9912/APPLDET:Report APPLDET 9912 Monthly report for EM
and a loooong list follows.
Strange, isn't it ?
Best regards, Andreas Schmidt, CSC, Germany
[log in to unmask] on 26/01/2000 05:16:45 PM
Please respond to [log in to unmask]
To: [log in to unmask]
cc: (bcc: Andreas Schmidt/GIS/CSC)
Subject: Re: posix shell fileset
"Simonsen, Larry" wrote:
>
> I'm having what seems to be a problem with a fileset in Posix. I'm in the
> shell and the command is
>
> $ grep -i "string" ../*RPT*/*
> **** Illegal instruction address (TRAPS 56).
>
> ABORT: GREP.HPBIN.SYS
> [1] + Done(139) grep -i "string" ../*RPT*/*
> 4259983 Segmentation violation grep
Hmmmm, and I thought it was only /bin/ar that had trouble with ../foo
filenames.
> can some one please help me with the format of the file parameter when the
> wild card character is in the middle of what is a group in the MPE
> directory?
Your grep syntax looks legal to me. You might want to see exactly what your
wildcard pattern is matching, i.e.:
echo ../*RPT*/*
As a workaround, you might try:
cd ..
grep -i "string" *RPT*/*
You should definitely open an HPRC call about the original problem. Grep
should not be aborting like that.
- Mark B.
|
|
|