私はコマンドの出力を格納する変数を持っています。浮動小数点と比較するにはどうすればいいですか?Bashの比較
私はfoo
がファイル名である
x=$(tail -n 1 foo| cut -d ' ' -f2)
if (($x < 0)); then ...
をしています。具体的に。私は次のエラー
-0.08 < 0 : syntax error: invalid arithmetic operator (error token is "0.08 < 0")
を得る上で、私は比較する必要がある値が-0.08
ですが、エラー・トークンは、私がこのような比較のために何をすべき
違うのですか?やってオン