help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] How to tell if an environment variable exists or not


From: Bill Gradwohl
Subject: [Help-bash] How to tell if an environment variable exists or not
Date: Mon, 5 Mar 2012 11:17:35 -0600

Assuming set -u, how does one test to see if an environment variable exists without creating it in the process? Specifically, if the variable is only unset, not null. I'm aware of :=, but that creates the variable if it didn't exist before. At the end of the test, the variables existence should be unchanged from before the test.

Thank you

--
Bill Gradwohl


reply via email to

[Prev in Thread] Current Thread [Next in Thread]