小编And*_*zak的帖子

Bash脚本:指定bc输出数字格式

问候!

我使用在我的脚本中进行一些计算.例如:

bc
scale=6
1/2
.500000
Run Code Online (Sandbox Code Playgroud)

为了在我的脚本中进一步使用,我需要"0.500000"的".500000".

你能帮帮我,为我的情况配置bc输出数字格式吗?

format bash

10
推荐指数
3
解决办法
2万
查看次数

标签 统计

bash ×1

format ×1