As Kaii mentioned, it's really overkill to call ruby or seq (which won't work on BSD or OSX machines) just to output a range of numbers. If you're happy with using bash you can:
for i in {0..20}; do
# command
done
I believe this should work for bash 2.05b and up.