bash中如何回声

发布于 2025-01-22 16:39:54 字数 112 浏览 2 评论 0原文

$ echo "`"
> _

_是输入,我认为)

$ echo "`"
> _

(_ is input, i think)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

秋千易 2025-01-29 16:39:54

逃脱严重的口音。这对外壳很特别,是执行命令替代的一种方式(古老的方法)。

echo \`

如 @dave_thompson_085所指出的那样,另一种选择是使用单个引号代替您使用的双引号,或者通过执行echo“ \ x60”来指定宽限期口音的十六进制表示。您可以从ascii manpages找到ASCII字符的十六进制等效物。

Escape the grave accent. It's special to the shell and is one way (the archaic one) to do command substitution.

echo \`

As noted by @dave_thompson_085 an alternative is to use single quotes in lieu of the double quotes you used, or to specify the hexadecimal representation of the grace accent, by doing echo "\x60". You can find the hexadecimal equivalents of ASCII characters from the ascii manpages.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文