Unix questions - Re: help I'm going mad - or how to check for the existence of an

This is Interesting: Free IT Magazines  
Home > Archive > Unix questions > December 2005 > Re: help I'm going mad - or how to check for the existence of an





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: help I'm going mad - or how to check for the existence of an
Ed Morton

2005-12-15, 8:50 pm

pc wrote:
> hi all,
>
> I want to check for the existence of an exnvironment variable in ksh:
>
>
> if [ -z "$my_variable" ]
> then echo "my_variable exists"
> else
> echo "my_variable does not exist"
> fi;
>
> This gives: ksh: @: parameter not set


Are you sure there isn't more to your script than that? Post a small,
complete script that exhibits this behavior.

Ed.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com