Created
April 30, 2013 14:06
-
-
Save scudelletti/5488942 to your computer and use it in GitHub Desktop.
Simple Function with Condition(IF) in Shell Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$VAR1=BlaBlaBla | |
$VAR1=PqPqPqPq | |
function export_ambient_variable_for() { | |
if [[ $1 = 'prod' ]]; then | |
echo 'Exporting ambient variables for Prod environment' | |
export ZZZZ=$VAR1 | |
else | |
echo 'Exporting ambient variables for Dev environment' | |
export ZZZZ=$VAR2 | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment