Created
November 28, 2017 15:33
-
-
Save LC43/92dea0688aee98e2443866f53142194a to your computer and use it in GitHub Desktop.
compare declare with assign
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
# use declare | |
var1="aaa"; var2=var1; declare "$var2=bbb"; echo $var1; echo $var2 | |
# returns: | |
# bbb | |
# var1 | |
var1="aaa"; var2=var1; var2=bbb; echo $var1; echo $var2 | |
# returns: | |
# aaa | |
# bbb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment