I'm writing a script that must work in bash and sh and it runs on a miniscule platform and some things appear to be missing such as seq. All these limitations/requirements is making writing this script VERY difficult. I need to write a for loop that works under all these requirements.
This only works for bash:
for (( i = 0; i <= 4; i++ ))
do
echo $i
done
This should work in sh, but the platform I'm using is apparently missing seq.
for i in $(seq 1 $INPUT); do
$INPUT is the max defined by the user.