Skip to content

Instantly share code, notes, and snippets.

@iwagaki
Created February 19, 2015 17:01
Show Gist options
  • Save iwagaki/279492054a50508bc2e0 to your computer and use it in GitHub Desktop.
Save iwagaki/279492054a50508bc2e0 to your computer and use it in GitHub Desktop.
bash read-only variable
#!/bin/bash
declare -r TEST="test" # read-only
TEST="!" # causes an error
echo ${TEST}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment