Subject: Re: bin/2905: setting environment vars from login
To: der Mouse <mouse@Holo.Rodents.Montreal.QC.CA>
From: Don Lewis <>
List: current-users
Date: 11/17/1996 16:19:48
On Nov 17, 12:02pm, der Mouse wrote:
} Subject: Re: bin/2905: setting environment vars from login
} > So long as you're able to start arbitrary binaries from the shell
} > you're given though, you are not be forced to use a vendor shell.
} Well, yeah, almost.  There's a problem only when I want shell scripts
} written for vendor shells to work.  Otherwise just setting it to sh and
} creating a .profile
} 	case $# in
} 		0)	exec /my/shell ;;
} 		*)	exec /my/shell "$@" ;;
} 	esac
} will do.  But I can't do that without losing sh scripts, and I can't
} use csh without losing csh scripts.

sh only executes .profile if it's a login shell, so this won't break
sh scripts.  Unfortunately, it doesn't do the right thing of you
"rsh somemachine do something" (since .profile is not executed, it'll
use sh, and even if you're not trying to change shells, you probably
won't have the PATH that you want).

I generally use a large hammer on folks who write csh scripts and
leave the '-f' off the "#!/bin/csh -f" at the beginning.  All the
path and alias setting that gets done in .cshrc files is pretty much
guaranteed to cause all sorts of mysterious breakage of scripts.
Besides, executing .cshrc each time a csh script is executed is *slow*.

			---  Truck