
10-13-2008
|
|
Shell programmer, author
|
|
|
Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,361
|
|
Quote:
Originally Posted by reksab_16
Hi Gurus,
New to Unix... What does the following if commands do?
if [ ! "$ORACLE_HOME" ]
then
. ${HOME}/.profile
fi
if [ ! "$COMMON_SOURCED" ]
then
. ./.common
fi
|
If the variable is empty or unset, then execute the code.
The more usual way to do it is:
Code:
if [ -z "$ORACLE_HOME" ]
then
. ${HOME}/.profile
fi
Quote:
Also please give me some tutorials for Unix which I can start with. Also please gimmme examples for shell scripting.
|
Here are some links to shell resources.
|