View Single Post

   
  #6 (permalink)  
Old 01-16-2008, 08:39 PM
nobody
 
Posts: n/a
Default Re: check for existence of environment variable


"Frank Slootweg" <this@ddress.is.invalid> schrieb im Newsbeitrag
news:43a31d62$0$287$dbd4b001@news.wanadoo.nl...
> pc <chalk@netspace.net.au> wrote:
>> hi all,
>>
>> I am having a problem checking for the existence of an environment
>> variable on an new HP-UX box (11.11) under ksh: This script for
>> example:
>>...

Hi !

There is something like :
${MyEnvVar?NowSet}

If MyEnvVar is set : nothing will be done ( but an error-message is sent to
stderr )
If MyEnvVar ist not set : it will become "NowSet"

To prevent the error-message use :
Something=${MyEnvVar?NowSet}

My ksh-book is in the company, so I can not look for this topic.
I will look into the book on monday.

regards
reinhard dot skarbal at aon dot at


Reply With Quote