错误中风:
printf "%15s\t%5d\t%5.2f%%\n" bc <<< "scale=2; 100 * $mac / $totals" > result
我不明白。 BC之前和$ totals之后”是符号`
最佳答案
printf "%15s\t%5d\t%5.2f%%\n" $(bc <<< "scale=2; 100 * $mac / $totals") > result
^^ ^
关于shell - shell 错误: redirection unexpected in using bc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19389852/