I saw the following snippet in this thread: How to change from csh to bash as default shell
sleep 2 if (-x /usr/local/bin/bash) then exec /bin/sh -c '. ~/.profile; exec /usr/local/bin/bash' endif
My understanding is that if you place this snippet in
~/.login it will invoke
bash when you login.
I have a similar situation where I would like to use a similar snippet to invoke a version of
zsh that is different from the default one with which I log in. Part of the reason why I am going through this trouble is because I can't choose my desired version of
zsh in the options allowed in
chsh, and I don't have administrator privileges.
- How would I change the snippet above to do this when switching between different versions of zsh?
- Why are two
execcommands needed in the snippet above? What do they do? Also, why does the snippet above use
bash(the user is supposed to login with