HP3000-L Archives

May 2002, Week 2

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:
Ken Hirsch <[log in to unmask]>
Reply To:
Ken Hirsch <[log in to unmask]>
Date:
Tue, 14 May 2002 14:42:55 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
----- Original Message -----
From: "Donald N. Frantum" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Tuesday, May 14, 2002 2:30 PM
Subject: [HP3000-L] grep in a shell script


> I am using SH.HPBIN.SYS to grep out data from a particular file.  However,
> it is not working as expected.  I am thinking that possible I have an
error
> in my syntax.
>
> Here is what I wrote:
> SH.BIN.SYS
> cd ..
> cd ../HPSPOOL/OUT
> grep '#j' O7419 >rejorder
> grep 'REJECT' O7419 >rejemal1
> exit
> When I use SH, it looks as if I am able to access the file(s)rejorder and
> rejemal1, but no file is written.  However when I use sh.hpbin.sys, I get
> an error message indicating that I can't access the file.

The shell is trying to create these to files in the directory /HPSPOOL/OUT,
which you probably don't have permission to do.

Instead of changing directory to /HPSPOOL/OUT, just:

grep '#j' /HPSPOOL/OUT/O7419 >rejorder
grep 'REJECT' /HPSPOOL/OUT/O7419 >rejemal1

and the files will be created in your current working directory.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2