Hi Guys,
What does this mean actually ? Can somebody give me any explanation ?
x=${x:=1}
Thanks
Hi Guys,
What does this mean actually ? Can somebody give me any explanation ?
x=${x:=1}
Thanks
From the (ksh) man page:
${parameter:=word}
If parameter is not set or is null then set it to word; the value of the parameter is then substituted.
Positional parameters may not be assigned to in this way.
That's to say if x is empty or not defined, it's set to 1.
Thank Scott