开发者

How to echo a variable? [closed]

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜