简体   繁体   English

bash中的传统划分符号

[英]Tradition division symbol in bash

writing a little bash script on CentOS for my kids to practice math and would like to display the tradition division line with two dots rather than the standard "/". 我在CentOS上写了一个bash脚本供我的孩子们练习数学,并希望显示带有两个点而不是标准“ /”的传统分界线。

Is there a way to do this in the linux bash shell? 在Linux bash shell中有没有办法做到这一点?

You can print Unicode characters with hex values like this: 您可以使用以下十六进制值打印Unicode字符:

$ printf '\u00F7'
÷

or 要么

$ echo -e '\u00F7'
÷

With bash: 用bash:

printf "%b" "\xc3\xb7"

Output: 输出:

÷

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM