首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >带度符号的linux whiptail

带度符号的linux whiptail
EN

Stack Overflow用户
提问于 2015-05-21 10:01:40
回答 1查看 358关注 0票数 0

我想使用whiptail显示一条包含度符号的消息。我试过这些,但似乎都不管用:

代码语言:javascript
复制
whiptail --title "Weather Info" --msgbox '\N{U+00B0}'  17 60 3>&1 1>&2 2>&3
whiptail --title "Weather Info" --msgbox "\N{U+00B0}"  17 60 3>&1 1>&2 2>&3
whiptail --title "Weather Info" --msgbox "\xc2\xb0"  17 60 3>&1 1>&2 2>&3
whiptail --title "Weather Info" --msgbox '\xc2\xb0'  17 60 3>&1 1>&2 2>&3

这是不可能的吗?

EN

回答 1

Stack Overflow用户

发布于 2015-05-21 17:02:49

whiptail和bash都不能帮助解决这种转义问题。您可以使用bash的内置echo来验证这一点。

如果在没有任何转义帮助的情况下使用字面度符号,则可以正常工作:

代码语言:javascript
复制
whiptail --title "Weather Info" --msgbox '°'  17 60 3>&1 1>&2 2>&3
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30363337

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档