A few questions

Thomas Knott knott at Informatik.TU-Muenchen.DE
Fri Dec 14 04:24:25 AEST 1990


In article <1990Dec11.202750.2435 at wpi.WPI.EDU>, fenn at wpi.WPI.EDU (Brian Fennell) writes:

...
|> Also:
|> I have been on a few network systems where I have a diferent shell
|> depending on what maghine I login to, but all the same files.  I
|> finnally got sick of rewriting both .login and .profile and made one a
|> link to the other, and added a test on $SHELL and a few aliases to
|> fake out csh and ksh into acting the same for varable assignment.
|> The question\chalange: what is the best way to do this so it will work
|> for all the shells I might run into. including aliases if-thens 
|> and variable assignment (I have a feeling the answer might be:
|> exec c_prog_login)
...

If the first line in your shell script looks like

#!/bin/sh

then the shell processing your script is the Bourne-shell sh, which should
be in /bin. This also works in the .login, .logout and .profile, I guess.

	Tom

--
Thomas Knott				knott at informatik.tu-muenchen.de



More information about the Comp.unix.shell mailing list