O'Reilly logo

Korn Shell: Unix and Linux Programming Manual, Third Edition, The by Anatole Olczak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Invoking The Korn Shell Separately

If you would like to use the Korn shell, but keep your login shell the same, you can avoid conflicts between the two shells by putting all of your Korn shell environment and startup commands in the environment file. This is specified by the ENV variable, which could be set in your Bourne shell .profile file like this:

					$ grep ENV $HOME/.profile
					ENV=$HOME/.kshrc
				

or in the C shell .login file:

					$ grep ENV $HOME/.login
					setenv ENV $HOME/.kshrc
				

This way, when you invoke the Korn shell, it will know where to look and find the environment settings. Here are some basic commands that should be in the environment file:

					$ cat $HOME/.kshrc
					SHELL=/usr/local/bin/ksh
					EDITOR=vi
					export SHELL EDITOR
				

The EDITOR variable specifies ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required