Reputation: 597
I try:
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 someone figure out what's wrong?
Upvotes: 5
Views: 1612
Reputation: 4191
You need a space before closing test expression
while [[ $c -le $n ]]
And surround your variable with "" to avoid some painful error :
while [[ "$c" -le "$n" ]]
Upvotes: 8