What is the difference between the following two shell arithmetic commands:
echo $[ $var1 - 1 ] echo $(( $var1 - 1 ))
Assuming var1 = 5 for example.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community