gpt4 book ai didi

bash - bash 中的传统除法符号

转载 作者:太空宇宙 更新时间:2023-11-03 17:17:51 26 4
gpt4 key购买 nike

在 CentOS 上为我的 children 写了一个小的 bash 脚本来练习数学,并希望用两个点而不是标准的“/”来显示传统的分界线。

有没有办法在 linux bash shell 中做到这一点?

最佳答案

您可以像这样使用十六进制值打印 Unicode 字符:

$ printf '\u00F7'
÷

$ echo -e '\u00F7'
÷

关于bash - bash 中的传统除法符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47737962/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com