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

Miscellaneous Commands

The following sections contain Korn shell equivalents of some miscellaneous C shell commands and functions.

The .logout File

In the C shell, commands in the ∼/.logout file are executed on exit. If the following command is added to the ∼/.profile file, then the same thing will happen in the Korn shell:

						trap '. ∼/.logout' EXIT
					

The chdir Command

The C shell chdir command changes to the specified directory and can be set to a Korn shell alias like this:

						alias chdir='cd'
					

The logout Command

The C shell logout command is equivalent to the exit command. It can be set to a Korn shell alias:

						alias logout='exit 0'
					

The setenv Command

The C shell setenv command is used to set/display variables and can be invoked like this: ...

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