Skip to content

Instantly share code, notes, and snippets.

@CTimmerman
Last active January 25, 2021 00:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CTimmerman/bc0f392ac6b5c10c690d318f76fde674 to your computer and use it in GitHub Desktop.
Save CTimmerman/bc0f392ac6b5c10c690d318f76fde674 to your computer and use it in GitHub Desktop.
echo -e '"$RANDOM returns a pseudorandom integer between 0 and 32767" - False.'
(( r = 1 ))
until ((r <= 0 || r >= 32767))
do
(( r = $RANDOM ))
done
echo -e "$r.\nSemicolons replace newlines:"
(( r = 5)); while ((r < 10)); do echo $r; (( r ++ )); done
echo "Ranges include end:"
for value in {1..5}
do
echo $value
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment