HP3000-L Archives

September 1995, 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:
Steve Elmer <[log in to unmask]>
Reply To:
Steve Elmer <[log in to unmask]>
Date:
Mon, 11 Sep 1995 21:06:57 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (39 lines)
Craig Vespe ([log in to unmask]) wrote:
: Chris Michael writes -
 
:    export _FNAME=$1
:    callci "file shprnt;dev=lp,1"
:    callci "print $_FNAME > *shprnt"
 
:    As the (mpe) print command now can print files in the HFS namespace,
:    you can now redirect the output to the spooler.  The handy thing
:    here is the (shell) exported variable is picked up as an MPE/iX variable,
                                                              ^^^^^^^^^^^^^^^
                                                              not true
:    but exists only for the duration of the script.
 
A word of caution: the callci command is a builtin in the 5.0 push release.
This means that no child process is created to handle your CI commands.
 
The _FNAME variable is indeed placed in your POSIX environment, and the child
has the opportunity to inherit it.  But, since the CI is not a POSIX program,
it never looks at it's POSIX environment.  This includes commands invoked via
HPCICOMMAND and COMMAND (e.g. callci).
 
The inheritance rule is that the POSIX program gets a static copy of the CI
variables into its POSIX environment at program initiation.  There is never
a case where the POSIX environment is placed back in the CI variables by the
system.
 
You might want to enhance your script:
 
export _FNAME=$1
_TEST=`expr index $_FNAME "./"`
if [ $_TEST = 0 ]; then
  _FNAME="./"$_FNAME;
fi
callci "file shprnt;dev=lp,1"
callci "print $_FNAME > *shprnt"
 
Steve

ATOM RSS1 RSS2