Suppose you had two commands:
First command
let foo=2+2
echo $foo
4
Second command
date "%s"
1377107324
How would you combine them?
Attempt 1.
echo The epoch time is: `date +%s` in 100 seconds the time \
will be: `let future={date +%s}+100` $future
Attempt 2.
echo The epoch time is: `date +%s` in 100 seconds the time \
will be: `let future=(date +%s)+100` $future
Plus about 30 other similar attempts
$( )
back to\
`` and it will do the same thing. What you actually did is changelet
to$(( ))
. – cjm Aug 21 '13 at 18:42