我存在一个真正令人厌恶的问题,即使用印本制作插图。
我的言辞看着这一点。
rt=$(printf "%.3f" 13.234324245)
with the difference, that i compute the number 13.23... above. When i use /usr/bin/zsh that works great! Even /bin/sh can do it (but it cant do the if stuff...)
The biggest problem ist that /bin/bash seems to does not understand printf or does have another formating way when i dont use LANG=C
.
My LANG 可变现为<代码>de_AT.UTF-8,然后取出:
/path/to/script: Zeile 12: printf: 13.234324245: Ungültige Zahl.
因此,它简单地说,一面打印件的数量是无效的......
Do i need to run printf in a different way?
编辑:问题似乎是计算数字:
rt=$(printf "%.3f" $(echo "$res2 - $res1"|bc ))
如何用<条码>、条码>而不是<条码>(<>>/代码>)来说明条码。