Skip to content

Instantly share code, notes, and snippets.

@chaimleib
Last active February 25, 2022 03:29
Show Gist options
  • Save chaimleib/a8d48fb0eab24437a9e2 to your computer and use it in GitHub Desktop.
Save chaimleib/a8d48fb0eab24437a9e2 to your computer and use it in GitHub Desktop.
print variable name and its value in bash
#!/bin/bash
function debug() { echo "$1 => \"$(eval echo \$$1)\"" >&2; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment