Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!ucsd!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!hp4nl!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.unix.questions Subject: Re: Login shell? Message-ID: <843@philmds.UUCP> Date: 23 Oct 88 08:01:08 GMT References: <3ed799bc.103e8@hi-csc.UUCP> <13851@mimsy.UUCP> <511@imec.UUCP> <1529@solo9.cs.vu.nl> <314@uplog.se> <842@philmds.UUCP> <7677@boring.cwi.nl> Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 22 In article <7677@boring.cwi.nl> dik@cwi.nl (Dik T. Winter) writes: |In article <842@philmds.UUCP> leo@philmds.UUCP (Leo de Wit) writes: | > 2) When I exec a shell in my .profile file (for instance if I want my | > own shell instead of /bin/sh or /bin/csh and don't want to bother my | > system manager), this shell doesn't start with '-'. | |But why not? This is just what I have done for a long time: in my bin: | ln -s $HOME/bin/my_shell -my_shell |and at the start of my .profile: | case $SHELL in | *my_shell) ;; | *) SHELL=$HOME/bin/my_shell | PATH=$HOME/bin exec -my_shell | esac |Works like a charm. My shell will even do .profile. I used that trick myself; not from a .profile but to get a .profile read. But as far as I know, symbolic links are a BSD feature; when you have to use a hard link, it may not be possible (different filesystem); even cp fails if the original shell wasn't readable. Leo.