[Shell]1 から 255 までカウントするスニペット。こういうのはちょっと応用が効くのでメモしておく。
#!/bin/sh | |
COUNT=1 | |
MAX_COUNT=256 | |
while [ $COUNT -lt $MAX_COUNT ] | |
do | |
echo "$COUNT" | |
COUNT=`expr $COUNT + 1` | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment