SYS V Bourne Shell .shrc file

Doug Gwyn gwyn at smoke.BRL.MIL
Sat Jan 13 09:02:44 AEST 1990


In article <1990Jan7.175807.13054 at NCoast.ORG> allbery at ncoast.ORG (Brandon S. Allbery) writes:
>As quoted from <11888 at smoke.BRL.MIL> by gwyn at smoke.BRL.MIL (Doug Gwyn):
>| In article <1864 at sauron.Columbia.NCR.COM> wescott at micky.Columbia.NCR.COM (Mike Wescott) writes:
>| >In article <1792 at ncrcce.StPaul.NCR.COM> mercer at ncrcce.StPaul.NCR.COM (Dan Mercer) writes:
>| >> The .shrc is also invoked prior to /etc/profile and ~/.profile on login.
>| >Nope.  After /etc/profile but before $HOME/.profile, mimicing csh's behavior.
>| Ugh -- it was obviously the wrong way around in csh, so why mimic that??
>I think the csh behavior cited above is more correct.  I've gotten sick of
>kluging around Altos's csh, which invokes .cshrc before /etc/cshrc

Certainly /etc/profile should be sourced before ~/.profile.
There should NOT be a /etc/shrc at all, and ~/.shrc (or better,
the file specified by the ENV environment variable) should be
sourced ONLY for an interactive shell and after ~/.profile for
a login shell.

Shell features should not be added as isolated items, but rather
designed carefully to work together.  We use the above approach
at BRL to provide extremely spiffy user environments both with
and without multiple windows.



More information about the Comp.unix.wizards mailing list