Bourne shell modifications sent to mod.sources
Arnold Robbins
arnold at gatech.CSNET
Sat Jun 8 04:50:25 AEST 1985
[ When there's something strange
In your computer room
Who ya gonna call?
Pr1mebusters! ]
I have just finished mailing nine articles to the moderator of mod.sources
which contain all you should need to add the following features to the
Bourne shell:
1. 4.2 BSD style job control on Berkeley Systems. Code to outwit symbolic
links for shells which have 'pwd' built in. Also code to print a
resource usage summary after every command on BSD systems. These are
courtesy of the folks at BRL, who gave me permission to post their
code. (See <230 at gatech.CSNET> in net.unix-wizards.)
2. The ability to catch Control-D's, and force you to use "exit", also
courtesy of BRL. This will work whether or not you are on a BSD system.
3. The <> I/O redirecter is now documented, and also works (courtesy of
ihnp4!trwrb!lcc!brian's recent posting in net.unix-wizards).
4. The shell parameter $+ gives you the parent process id of the shell.
It will track the value of the getppid() system call.
5. The shell will read in $HOME/.shrc on startup, if that file exists.
This file is read *after* /etc/profile and $HOME/.profile (unlike the
csh, which reads ~/.cshrc before ~/.login).
6. The ~ and ~person notation is understood, both for command line arguments,
and in the PATH and CDPATH shell variables.
7. Special sequences in PS1 (the shell's prompt string) will print useful
info at the prompt. Currently, you can get or all or some or none of:
the time of day
your current directory (if the shell has pwd is built in)
your machine's hostname
your login name
the current 'event' number for the ...
8. History mechanism. The history mechanism is powerful, yet easy to use.
Although different from the csh's, it is somewhat more general and
orthogonal. The shell will save history across login sessions,
automatically restoring on login, and saving on exit or on the exec builtin.
Unlike the csh, no history processing is done inside shell files.
On a Pyramid, the shell has some additional capabilities:
9. The 'att', 'ucb' and 'universe' commands are built in.
10. The $UNIVERSE shell variable tracks the current universe.
11. An additional sequence for the prompt to print the current universe.
----
There are nine articles. They contain the following:
Part 1 -- README.gt.sh, new .c files needed for the shell, miscellanious stuff
Part 2 -- Context diffs of C code for 4.2 BSD /bin/sh
Part 3 -- Context diffs of C code for 4.2 BSD /bin/sh
Part 4 -- Context diffs of sh.1 for 4.2 BSD /bin/sh
Part 5 -- Context diffs of C code for System V Release 2 /bin/sh
Part 6 -- Context diffs of C code for System V Release 2 /bin/sh
Part 7 -- Context diffs of sh.1 for System V Release 2 /bin/sh
Part 8 -- Context diffs of C code for BRL Unix /usr/5bin/sh
Part 9 -- Context diffs of sh.1 for BRL Unix /usr/5bin/sh
I had to split these up into so many articles in order to insure that each
one would be less that 64K in size.
The USENET mod.sources group is forwarded along with net.sources into the
UNIX-SOURCES at BRL mailing list. ARPAnet people should get it from there if at
all possible.
I realize that there will be people who for some reason will not get it
from either news group, both on ARPANET and USENET; probably because their
machine does not get either list. If you can get it from someone nearby who
does subscribe to one of these groups, that is to be preferred. I would like
to keep our phone bill down as much as possible. Since we are a CSnet site,
we pay the phone bill for mail sent into and received out of the ARPANET via
Csnet-relay.ARPA. However, if it is totally impossible for you to get it
anywhere else, send me mail indicating which of the 3 versions of the shell
you have, and I will mail you the appropriate diffs. I will probably save up
the requests for a while, and then mail them all out at once.
If you install my mods, and like them, please let me know. I would like to
get back bug fixes, as well as suggestions for other things to put in.
If enough changes and suggestions come in, I will do my best to incorporate
them, and then make another posting in a few months.
Enjoy!
--
Arnold Robbins
CSNET: arnold at gatech ARPA: arnold%gatech.csnet at csnet-relay.arpa
UUCP: { akgua, allegra, hplabs, ihnp4, seismo, ut-sally }!gatech!arnold
How come nobody likes good ideas when they don't come up with them?
More information about the Comp.unix.wizards
mailing list