Skip to content
Snippets Groups Projects
Commit 88733e2c authored by Andrew Ruder's avatar Andrew Ruder Committed by Tom Rini
Browse files

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: default avatarAndrew Ruder <andrew.ruder@elecsyscorp.com>
parent 8948794a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment