Wednesday, January 07, 2009

Setting up your unix environment

. profile plays a prominent role in setting up environment, you Unix command prompt, your default etc. It is also useful in setting up some of your environment variables.

Ex: PATH is one of the most important environment variables stores the path for Unix executables.

Customizing your command prompt:
Placing the following code snippet in your .profile file will give you a Unix prompt that identifies your current server name, database name, and working directory. Knowing this information can help prevent you from accidentally running a command against the wrong database.

#***********************************************
# Standard Unix Prompt
#***********************************************
PS1="
`hostname`[\${ORACLE_SID}]\${PWD}=>
>"

Ex: Your command prompt will look like:
orcl.com[DEMO]/optware/oracle=>

No comments: