HP3000-L Archives

August 1998, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"James Clark, Jr." <[log in to unmask]>
Reply To:
Date:
Thu, 20 Aug 1998 12:22:22 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (56 lines)
Since many of the sh.hpbin.sys functions are executables from the ci side you
could use the find command and the -exec option to grep any file you find. Sorry
I don't know if find is an executable, haven't had the need to use it on the
HP3000.
The command would look like this in the shell $find /SDL -exec grep KSAMUTIL {}
\;
and what the command does is starting from the /SDL directory for every object
found (you could limit it to only files with filters) do a grep KSAMUTIL against
it.
I have learned to love the find command. I have on many occasions wanted to
search for something and after inputting the command be told "too many
arguments" because the shell expands wildcards making the command line monstrous
if you have a lot of files which match the wildcard.

James

> -----Original Message-----
> From: HP-3000 Systems Discussion [mailto:[log in to unmask]]On
> Behalf Of Michael D. Hensley
> Sent: Thursday, August 20, 1998 11:47 AM
> To: [log in to unmask]
> Subject: Fileset using GREP.HPBIN.SYS
>
>
> Tony Furnivall asked why grep'ing a fileset works in the shell, but not from
> the ci.
>
> This is an important POSIX/Unix concept: when you type a command in the shell
> (pretty much *any* Unix shell), the *shell* expands the wildcards.  Utilities
> like "grep" do not know how to process filenames with embedded wildcards.
> They do handle a list of filenames, though.
>
> For example, if you type:
>
> $ grep "mystring" foo*
>
> the shell expands this into
>
> $ grep "mystring" foo1 foo2 foo3
>
> before executing it.
>
> The MPE CI doesn't do wildcard expansion.  Some commands (like PURGE), and
> some utilities (like DSCOPY) handle wildcarded filenames on their own.
>
> Learning this concept is key to using the POSIX utilities from the CI.
>
> Have fun, and good luck!
>
> ---
> Michael D. Hensley       |
> Allegro Consultants Inc. | mailto:[log in to unmask]
> 408/252-2330             | Visit scenic http://www.allegro.com
> "Support Bill of Rights Enforcement"
>

ATOM RSS1 RSS2