我想使用whiptail显示一条包含度符号的消息。我试过这些,但似乎都不管用:
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这是不可能的吗?
发布于 2015-05-21 17:02:49
whiptail和bash都不能帮助解决这种转义问题。您可以使用bash的内置echo来验证这一点。
如果在没有任何转义帮助的情况下使用字面度符号,则可以正常工作:
whiptail --title "Weather Info" --msgbox '°' 17 60 3>&1 1>&2 2>&3https://stackoverflow.com/questions/30363337
复制相似问题