It's parameter substitution.

Use the first one if not null, otherwise use the second.

Try this: 

> TEST=${ORACLE_HOME:-NOT SET} 
> echo $TEST

Now try misspelling ORACLE_HOME


> TEST=${ORACLE_JOME:-NOT SET} 
> echo $TEST

In a script you may have to begin the line with a colon.

e.g.  :  TEST=${ORACLE_HOME:-NOT SET} 


Jared



On Tuesday 25 February 2003 01:28, Sinardy Xing wrote:
> Hi all,
>
> Can someone help me understand this...
>
> ROOT # TEST=${2:-.}
> ROOT # echo $TEST
> ROOT #.
>
> what is 2:-.
>
>
> another similar code
>
> ROOT # TEST=${1:-0}
> ROOT # echo $TEST
> ROOT # 0
>
>
>
> they looks like emoticon for me
>
> Thank you
>
> Sinardy
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jared Still
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to