You can, simply, change shells by executing the shell program; e.g., if you're login shell is BASH, you can change to C-shell by typing chs or Korn shell by typing ksh.
Now, here's the rub: doing that does not load the content of .login (in the case of C-shell) or .profile (and, possibly, .kshrc) in the case of Korn shell. It's possible that both C-shell and Korn shell will inherit any environment variables set by the initial BASH login but I wouldn't want to count on that in every situation. If you only need to temporarily change shells to run, say, a shell program, it would be much better (and more reliable) to embed #!/bin/shelname as the first line of your shell program; e.g., #!/bin/chs, #!/bin/ksh, etc. and set any special environment variables in the shell program.
|