MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/bashtricks/comments/d011vc/why_the_single_quote_act_differently/
r/bashtricks • u/rifaterdemsahin • Sep 05 '19
4 comments sorted by
2
Single quotes means literal. It will give you exactly what is between the single quotes, no variable replacement or anything.
Use double quotes instead unless you're wanting to print down text exactly.
1 u/rifaterdemsahin Sep 19 '19 makes sense the double quotes enables the variables to be printed out I suppose that is the main use case right?
1
makes sense the double quotes enables the variables to be printed out I suppose that is the main use case right?
0
[deleted] — view deleted comment
1 u/rifaterdemsahin Sep 05 '19 Backticks are for command substitution.allright thanksI have a hard time doing the backtick on my mac ....when I hit it the quote comes up...how do you work it out? 1 u/rifaterdemsahin Sep 05 '19 echo $(pwd)so much simpler than... in terms of syntax.
Backticks are for command substitution.
allright thanks
I have a hard time doing the backtick on my mac ....when I hit it the quote comes up...
how do you work it out?
echo $(pwd)
so much simpler than... in terms of syntax.
2
u/Sunsparc Sep 05 '19
Single quotes means literal. It will give you exactly what is between the single quotes, no variable replacement or anything.
Use double quotes instead unless you're wanting to print down text exactly.
0
u/[deleted] Sep 05 '19
[deleted] — view deleted comment