Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!fauern!lan!Informatik.TU-Muenchen.DE!knott From: knott@Informatik.TU-Muenchen.DE (Thomas Knott) Newsgroups: comp.unix.shell Subject: Re: A few questions Keywords: shell Message-ID: <1990Dec13.182425@Informatik.TU-Muenchen.DE> Date: 13 Dec 90 17:24:25 GMT References: <1990Dec11.202750.2435@wpi.WPI.EDU> Sender: news@lan.informatik.tu-muenchen.dbp.de Reply-To: knott@Informatik.TU-Muenchen.DE (Thomas Knott) Organization: Technische Universitaet Muenchen, West Germany Lines: 27 In article <1990Dec11.202750.2435@wpi.WPI.EDU>, fenn@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@informatik.tu-muenchen.de