0153デフォルトの名無しさん垢版 | 大砲2021/04/18(日) 21:59:30.04ID:qI95yZS9 #/bin/sh result=21 result2=3.1415 echo "$result * 10" | bc | cut -c 1-2 # 実行結果:21 echo "scale=5; $result2 * 10" | bc | cut -c 1-2 # 実行結果:31