Skip to content

Instantly share code, notes, and snippets.

@huned
Last active August 29, 2015 14:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huned/edc6381df403bfcabee9 to your computer and use it in GitHub Desktop.
Save huned/edc6381df403bfcabee9 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Generate n random numbers in [0, 999]. n defaults to 100 but override it with $1.
if [ "$1" == '' ]; then
upto=100
else
upto=$1
fi
for i in `seq 1 $upto`; do echo $(($RANDOM % 1000)); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment