descending loop with variable bash
Bash has a for
loop syntax for this purpose. It's not necessary to use the external seq
utility.
#!/bin/bash
FROMHERE=10
for ((i=FROMHERE; i>=1; i--))
do
echo $i
done
You should specify the increment with seq:
seq $FROMHERE -1 1