global .login for cshrc
Steve Hayman
sahayman at iuvax.cs.indiana.edu
Thu Nov 1 04:09:40 AEST 1990
>Many's the time I'd like to
>add a new directory to everybody's path, and other things like that, and
>it's a pain to notify everybody that the should manually add lines...
One way out is to have a path-setting command. If everyone has something
like this in their .cshrc:
setenv PATH $HOME/bin:`/bin/path`
and /bin/path is a simple script that outputs whatever you want the
default path to be:
#!/bin/sh
echo /usr/local/bin:/usr/bin/X11:/usr/ucb:/bin:/usr/bin
then you just need to change /bin/path when you add a new directory.
Of course it's a bit of work to get everyone to use this but
it may pay off in the long run.
You can also use a fancier scheme if you want different "kinds" of
paths - one set of paths for administrative shell scripts, etc etc.
maybe your shell scripts all begin with
PATH=`/bin/path admscript` export PATH
you could have /bin/path output various different paths depending
on its first argument. So users get one path, scripts get
another, etc etc, and all you ever have to fool around with is
one file, /bin/path.
More information about the Comp.unix.ultrix
mailing list