HP3000-L Archives

August 1996, Week 4

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:
Jeff Kell <[log in to unmask]>
Reply To:
Jeff Kell <[log in to unmask]>
Date:
Wed, 21 Aug 1996 13:53:44 EDT
Content-Type:
text/plain
Parts/Attachments:
text/plain (107 lines)
I hope John doesn't mind me posting his question/my reply to the list but
this is probably useful to many of you dabbling with Posix.  Some others on
the list might wish to tweak my suggestions a bit more, but this should get
the ball rolling:
 
On Wed, 21 Aug 1996 12:12:04 -0400 (EDT) John Korb said:
>Jeff, perhaps you can help (yes, I have more questions!).
>I'd like to invoke the shell to execute a single command but not have the
>shell's banner displayed.
 
Hope you can use 'vi' to edit bytestream files (if not, that's an experience
in itself)... anyway...
 
In the file /etc/profile you probably want to make some changes (this is 5.5
but 4.0 is markedly similar) anyway, so let me take this opportunity to list
the fundamentals of this file which is executed when you invoke the shell.
I won't list the whole file here, but these lines should be easy enough to
find.  The quick answer to your original question is #6 below, if you're in
a hurry :-)
 
-----change #1-----
# set up the default path to include only the .2 utilities and the current
# directory
export PATH='/bin:.'
             ^^^^^^
If you are using Gnu/gcc/perl/etc., you can take Mark Klein's earlier
suggestion of aliasing make to the Gnu make and adding /usr/local/bin
after /bin above yielding '/bin:/usr/local/bin:.' or you can avoid the
alias by putting /usr/local/bin first (sort of the HPPATH idea of system
stuff last, not first) for '/usr/local/bin:/bin:.'  Many would argue that
the trailing '.' is unnecessary/dangerous, and I rather agree (if you want
to execute something locally, you have to './foo' instead of 'foo' but so
what).  Let's go on...
 
-----Change #2-----
# Set up the default user prompt.
export PS1='shell/iX> '
                   ^^^
Stan (I think) previously pointed out that a '>' in the prompt string can
bite you with an HP terminal should you hit 'enter' rather than 'return' :-)
If you leave it, at least add a "set -o noclobber" to avoid messes.
 
-----Change #3-----
# default for the term variable is the supported HP terminal definition.
# NOTE: the only supported terminal definitions are 'hp2392a' and 'ansi'. All
# other definitions are provided as user-supported software only!
export TERM='hp2392a'
 
Gee, what if you are a vt100?  Our logon UDC determines TERM (well, it can
find an HP terminal; if that test fails we assume vt100) so I would change
this line to:   export TERM=${TERM:-hp2392a}
This will retain the current value of TERM if it is defined, otherwise it
takes the default value of 'hp2392a'.
 
-----Change #4-----
# Set the following variable to the appropriate value for the timezone
# you are in. Refer to the timezone manual page in section 5 of the
# reference manual for more information.
export TZ=GMT0
          ^^^^
I dislike that one terribly.  Most of you 'should' be setting TZ already
since C/iX used this for times, and now COBOL post85 functions do also.
Using the same logic as #3, change to:  export TZ=${TZ:-EST5EDT}
Since the MPE routines dependent on TZ now 'default' to EST if TZ isn't set
this mimics MPE behavior (but of course you'd want to use your own timezone).
I'm trying to keep this "generic" enough for HP to apply to the FOS (hint...)
 
 
-----Change #5-----
# Define a number of aliases for common MPE/iX commands
alias -x copy="callci copy"
alias -x listf="callci listfile"
alias -x listgroup="callci listgroup"
alias -x listuser="callci listuser"
 
These are useful I guess, and you can expand as much as you like; but what is
really missing is:
alias -x telnet="/SYS/ARPA/TELNET"
alias -x ftp="/SYS/ARPA/FTP"
alias -x mover="/TELESUP/PRVXL/MOVER"  (or whereever you put your copy)
 
-----Change #6-----
# Clear the screen, set the tab stops and print out the message of the day
# Note - if your system is using terminal types other than the default
# HP2392a, the clear will not work properly since sends codes to clear the
# screen based on the setting of TERM
tput clear
tabs
cat /etc/motd
 
OK, for those of you that don't like the screen cleared, delete or comment
out the 'tput clear'.  You pretty much need the tabs.  And here you are,
John, if you don't like that banner remove or comment out 'cat /etc/motd'.
And if you want a banner but would like to make your own, edit /etc/motd
and put in whatever you like.
 
-----Change #7-----
This is an additional line; you can put it up with #1 or anywhere else in
the file.  If you're using Gnu/perl/etc, you will need to set MANPATH to
look in the man pages directory for Gnu.  Add the line:
 
export MANPATH="/usr/local/man:/usr/man"
 
Good luck!
 
Jeff Kell <[log in to unmask]>

ATOM RSS1 RSS2