Think before you speak, read before you think.

bash中减法计算

by

in

做减法

bc <<< "$new-$old"
echo "$new-$old" | bc
echo "$new $old" | awk '{print $1-$2}'
awk '{print $1-$2}' <<< "$new $old"

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *