Skip to content

Instantly share code, notes, and snippets.

@gdebenito
Created November 12, 2020 09:05
Show Gist options
  • Save gdebenito/651fb66035ee445ae082f6e576545976 to your computer and use it in GitHub Desktop.
Save gdebenito/651fb66035ee445ae082f6e576545976 to your computer and use it in GitHub Desktop.
// Print variable name with the variable value
printVariable() {
variableName=$1;
variableValue=$(eval "echo -n \$$1");
echo "$variableName=$variableValue";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment