0
我想用whiptail顯示一個包含度符號的消息。我試過這些,但沒有一個看起來有效:linux 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
難道不可以這樣做嗎?
其實猛砸4支持'printf的「\ u00B0''如果你希望你的腳本是便攜純ASCII和健壯性。不過,你需要一個像' - msgbox「$(printf'\ uB0')」'這不是非常好的elegat的進程替換。 – tripleee
我看到了(可移植性的一半,因爲它仍然是一個bash特有的功能)。 –
你好,對不起,我幾個星期沒上線了。我嘗試了printf方式,但它不起作用。度符號顯示爲pattersn,即終端中塊光標的大小。這是一個鏈接到輸出:http://ibin.co/23nV4khMxKwV。 –