K ksiu Apr 1, 2021 #1 hi, How do I make the "let" command stay quiet? So, the example below...I just want the output to be -1. Code: $ let x=2 ; let j=3; let i=x-j ; echo $i 2 3 -1 -1
hi, How do I make the "let" command stay quiet? So, the example below...I just want the output to be -1. Code: $ let x=2 ; let j=3; let i=x-j ; echo $i 2 3 -1 -1
SirDice Administrator Staff member Administrator Moderator Apr 1, 2021 #2 Don't use let? POSIX says to use $((....)) for arithmetic. Code: $ x=2; j=3; i=$(($x-$j)); echo $i -1
Don't use let? POSIX says to use $((....)) for arithmetic. Code: $ x=2; j=3; i=$(($x-$j)); echo $i -1