Just a quick clarification. Our routers use POSIX, not Bash. (You can enable it if you so choose, but it gets more messy). POSIX shell has issues with advanced loops like this... you probably want to use something like this:Try to run a simple loop script
Code:#!/bin/sh max=10 for (( i=2; i <= $max; ++i ))do echo"$i" done
but im getting "syntax error: bad for loop variable" when I run it. Wht am I doing wrong?
Thanks.
i=0
while [ $i -le 10 ]; do
echo "$i"
i=$(( i + 1 ))
done
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!