I'm trying to:
while [[ $c -le $n]] do now=$(date +"%T") echo "Tps at :- $now" @c=$c+1 done
I got:
syntax error in conditional expression syntax error near `do'
Can anyone figure out what happened?
You need space before closing the test expression
while [[ $c -le $n ]]
And surround the variable "" to avoid any painful mistake:
while [[ "$c" -le "$n" ]]