
24 Jan
2012
24 Jan
'12
11:43 a.m.
Dear Sridhar Addagada,
In message 1327396047.99588.YahooMailNeo@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 "setenv" may or may not work, depending on your command selection.
if test $x = 1; then echo "Yes"; else echo "No"; fi
This should provoke an error from the "test" command which misses an argument.
in the above case I get Yes echoed back.
That's a bug then. Patches welcome...
Is there any way to test the presence of a variable in uboot script?
This should be possible like in any other shell...
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Alan Turing thought about criteria to settle the question of whether
machines can think, a question of which we now know that it is about
as relevant as the question of whether submarines can swim.
-- Edsger Dijkstra