Unix variable question

2003-02-25 Thread Sinardy Xing
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

Re: Unix variable question

2003-02-25 Thread Jared Still
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. :

AW: Unix variable question

2003-02-25 Thread Kulev, Milen
Nachricht- Von: Sinardy Xing [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 25. Februar 2003 10:29 An: Multiple recipients of list ORACLE-L Betreff: Unix variable question Hi all, Can someone help me understand this... ROOT # TEST=${2:-.} ROOT # echo $TEST ROOT #. what is 2:-. another

Re: Unix variable question

2003-02-25 Thread Sergey V Dolgov
Hello Sinardy, Tuesday, February 25, 2003, 3:28:42 PM, you wrote: SX Hi all, SX Can someone help me understand this... SX ROOT # TEST=${2:-.} SX ROOT # echo $TEST SX ROOT #. SX what is 2:-. The construction ${A:-B} is just like oracle nvl function. If variable A is defined and not null then

Re: Unix variable question

2003-02-25 Thread Markus Reger
look into man page eg bash or sh and search for ${ (is type in /\$\{ ) and find all necessary details. lol Apologies for any typing mistakes I failed to notice. Markus Reger Oracle Applications DBA Webmaster MBC University for Music and Performing Art Vienna [EMAIL PROTECTED] 02/25/03