POSIX Topics | POSIX Utility Descriptions |Previous | Next

SH Command Information


Before using the shell, you may need to customize your environment. Some of the environment variables that you may want to set are:

ENV=location of .profile equivalent

PATH=location of sh executable

TZ=appropriate timezone

A sample .profile file may look something like this:

alias a=alias

alias md=mkdir

alias rd=rmdir

alias ua=unalias

set -o vi

PS1='[!] '

These commands set four aliases, make available vi-style command-line editing, and set the prompt to display the current command number inside of brackets. For a more complete view of what the shell can do, see a good book on the subject, such as Bolsky & Korn's The KornShell Command and Programming Language, published by Prentice Hall (ISBN 0-13-516972-0).

There is an extension to the typeset built-in command, a "-p" parameter, representing POSIX customization of an environment variable.

For example, if there were a variable named GLOP that contained "C:\users\default\telnet.trm", applying typeset -p GLOP to it would result in GLOP having the value "//C/users/default/telnet.trm".

The converse command, typeset +p GLOP, would "de-POSIX-ize" the variable, leaving the original value in GLOP.

Note that Windows 2000 environment variables that reference other Windows 2000 environment variables, for example, SET LOGNAME=%UserName%, will not be expanded inside of the shell; such variables will have the unexpanded valueĆ¹for example, LOGNAME would contain "%UserName%", not "Administrator".