How to echo a variable? [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this questionI use echo "smth $string"
, but I want that it would echo sm开发者_Go百科th $string, not variable. How can I do it?
Escape the $
:
echo "smth \$string"
Or maybe use single quotes
echo 'smth $string'
does this work?
echo "smth \$string"
精彩评论