In message <1327404627.60813.yahoomail...@web120202.mail.ne1.yahoo.com>
> For now i got around this problem with a negative test
> set x
>
> if test $x != 1 then echo "No"; else echo "Yes"; fi
>
> with this if x is not present i get No, even in the case when x is
> present and set any other value
in i get "Yes"
Thanks
Sridhar
From: Wolfgang Denk
To: Sridhar Addagada
Cc: "u-boot@lists.denx.de"
Sent: Tuesday, January 24, 2012 4:13 PM
Subject: Re: [U-Boot] u-boot script "test"
Dear Sridhar Addagada,
In message <1327396
Dear Sridhar Addagada,
In message <1327396047.99588.yahoomail...@web120201.mail.ne1.yahoo.com> you
wrote:
>
> What is the behavior of test command when the variable is not present in the
> uboot env
It should be the same as in any other bourne compatible shell.
> set x
Note that "set" for "se
What is the behavior of test command when the variable is not present in the
uboot env
set x
if test $x = 1; then echo "Yes"; else echo "No"; fi
in the above case I get Yes echoed back.
Is there any way to test the presence of a variable in uboot script?
Thanks
Sridhar
4 matches
Mail list logo