Larry,
As pointed out already the wildcard expansion into real filenames is
performed by the shell, not by grep itself. However, you can still run a
caseless string search against a set of files from the CI prompt by using
the following command file. I also show a search of a group of COBOL source
files for the HPCICOMMAND intrinsic.
:help search
USER DEFINED COMMAND FILE: SEARCH.CMD.SYS
parm SrchString,SrchFiles
purge shellin,temp >$null
echo grep -i '!SrchString' !SrchFiles >shellin
echo exit >>shellin
xeq sh.hpbin.sys <shellin
:search hpcicommand,*
COMMAND:029000 CALL INTRINSIC "HPCICOMMAND" USING LK-COMMAND, LK-ERR,
DCOMMAND:029000 CALL INTRINSIC "HPCICOMMAND" USING LK-COMMAND, LK-ERR,
TAPELDVS:015350 CALL INTRINSIC "HPCICOMMAND" USING WS-COMMAND,
ERR-RETURN,
HPCICMD:003000 PROGRAM-ID. "\HPCICOMMAND".
Doug.
Doug Werth Beechglen Development Inc.
[log in to unmask] Cincinnati, Ohio
The opinions expressed do not necessarily represent the views or
opinions of Beechglen Development. They might but not necessarily.
They represent solely the opinions of the author.
"Programming is an art, not a science, and not all programmers
are Picassos." -- Frank Bajak, Associated Press
----- Original Message -----
From: Simonsen, Larry <[log in to unmask]>
To: <[log in to unmask]>
Sent: Thursday, January 06, 2000 11:27 AM
Subject: grep
> Is there a way of running grep without going into the Unix shell. Wish to
> run it from a Qedit prompt.
>
> Here is a sample of what I am trying.
> grep '-i "glfisctoindex" ../SRCLIST/*'
>
> GREP.HPBIN.SYS: input file "../SRCLIST/*": No such file or directory
> S/b
> grep '-i "glfisctoindex" ../SRCLIST/*'
> @
> grep '-i "glfisctoindex" ../SRCLIST/@'
>
> GREP.HPBIN.SYS: input file "../SRCLIST/@": No such file or directory
> S/b
> grep '-i "glfisctoindex" ../SRCLIST/@'
> @.srclist
> grep '-i "glfisctoindex" @.srclist '
>
> GREP.HPBIN.SYS: input file "@.srclist": No such file or directory
>
> -------------------------------------------------
> 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.
|