Skip to content

Instantly share code, notes, and snippets.

@BennettSmith
Created April 25, 2013 03:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BennettSmith/5457284 to your computer and use it in GitHub Desktop.
Save BennettSmith/5457284 to your computer and use it in GitHub Desktop.
Experiment to verify conditional assignment of a default value for DOXYGEN environment variable.
#!/bin/bash
DOXYGEN=${DOXYGEN-/Applications/Doxygen.app/Contents/Resources/doxygen}
echo ${DOXYGEN}
@BennettSmith
Copy link
Author

Here is some sample output from running the script in the two modes (without overriding the value of DOXYGEN and with an override).

$ ./experiment.sh
/Applications/Doxygen.app/Contents/Resources/doxygen
$ DOXYGEN=foobar ./experiment.sh
foobar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment