bash number add

조회 1,423 · 댓글 0
유호석작성자2017년 12월 14일
num=$((num1 + num2))

num=$(($num1 + $num2)) # also works
num=$((num1 + 2 + 3)) # ...
num=$[num1+num2] # old, deprecated arithmetic expression syntax


관련 팁 : /index.php/forum/tips/1638-bash

로그인 후 답글을 남길 수 있습니다.