]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
cmd_nvedit.c: Add env exists command
authorAndrew Ruder <andrew.ruder@elecsyscorp.com>
Wed, 23 Oct 2013 00:07:34 +0000 (19:07 -0500)
committerTom Rini <trini@ti.com>
Fri, 8 Nov 2013 14:38:24 +0000 (09:38 -0500)
commit88733e2c65b1b118e6e1a942d62a48ce62a5ea40
treed34db65ce88b141c2b737a0767084a0899f17719
parent8948794a273a6b4925d1acc5788ce804f0ceb410
cmd_nvedit.c: Add env exists command

env exists is a way to test (in hush) if an environment variable
exists.  A workaround existed using printenv but this new command
doesn't require all the stdout/stderr redirection to prevent
printing information to the screen.

Example:
$ set testexists 1
$ env exists testexists && echo "yes"
yes
$ env exists testexists || echo "no"
$ set testexists
$ env exists testexists && echo "yes"
$ env exists testexists || echo "no"
no
$

Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
README
common/cmd_nvedit.c