Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • 1
    Your question isn't clear. Do you mean to say that you can modify the script but cannot change the variable name? Commented Mar 24, 2014 at 6:37
  • @devnull yes, I can change in the script how echo is invoked (as-to print the local env variable, ie. as if the user typed echo ${VAR_A} from their bash prompt), but I cannot change either the user's existing env variable nor the name of the bash script's variable. Commented Mar 24, 2014 at 7:06
  • And the variable in question is an environment variable set outside the script? Commented Mar 24, 2014 at 7:08
  • @devnull correct. (sorry for the late response, was pretty late here last night) Commented Mar 24, 2014 at 14:36
  • @devnull it is setup by .bashrc when the user logs in. Commented Mar 24, 2014 at 14:42