mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Fixed line 59 - printing
Using echo with ' ' means that the variable won't be expanded, so it should print the literal $Variable instead of some string.
This commit is contained in:
parent
593e2baff7
commit
027e152dda
@ -56,7 +56,7 @@ Variable= 'Some string' # => returns error: "Some string: command not found"
|
|||||||
# Using the variable:
|
# Using the variable:
|
||||||
echo $Variable # => Some string
|
echo $Variable # => Some string
|
||||||
echo "$Variable" # => Some string
|
echo "$Variable" # => Some string
|
||||||
echo '$Variable' # => Some string
|
echo '$Variable' # => $Variable
|
||||||
# When you use the variable itself — assign it, export it, or else — you write
|
# When you use the variable itself — assign it, export it, or else — you write
|
||||||
# its name without $. If you want to use the variable's value, you should use $.
|
# its name without $. If you want to use the variable's value, you should use $.
|
||||||
# Note that ' (single quote) won't expand the variables!
|
# Note that ' (single quote) won't expand the variables!
|
||||||
|
Loading…
Reference in New Issue
Block a user