linux シェルスクリプト 四則演算
・変数 left と right の値を足して sum に入れる
・引き算など他の四則演算も同じ
・Add the values of variables left and right and put them in sum
・The same applies to other arithmetic operations such as subtraction.
left=123
right=456
sum=$(( $left+$right ))
・変数 left と right の値を足して sum に入れる
・引き算など他の四則演算も同じ
・Add the values of variables left and right and put them in sum
・The same applies to other arithmetic operations such as subtraction.
left=123
right=456
sum=$(( $left+$right ))
コメント
コメントを投稿