开发者

How to echo a variable? [closed]

开发者 https://www.devze.com 2023-04-12 10:27 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

Improve this question

I 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"
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号