Did you know: Hypen, -, is not allowed in script variable names!
a="A"
b="B"
echo "$a_$b"
will print B??!!
it will treat $a_ as the first variable name.
To fix it
echo "${a}_${b}"
a="A"
b="B"
echo "$a_$b"
will print B??!!
it will treat $a_ as the first variable name.
To fix it
echo "${a}_${b}"
No comments:
Post a Comment