Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Count to one million script with text coloring (for forum games)
- # This script requires a program called 'xsel' to
- # copy the text to the X clipboard.
- # This script is contributed to the public domain with CC0.
- # See https://creativecommons.org/publicdomain/zero/1.0/legalcode for more info.
- # Checks if command line options are missing.
- if [[ $1 = "" ]]; then
- echo "Usage: `basename $0` [NUMBER]..."
- exit 1;
- fi
- let "NUMBER = $1"
- QUITHANDLER=0
- END=1
- while [[ $QUITHANDLER -lt $END ]]
- do
- let "REMAINING = 1000000 - $NUMBER"
- echo "[color=#$NUMBER]$NUMBER[/color]
- (Only $REMAINING to go!)" | xsel -b -i
- echo "Copied to clipboard ($NUMBER) Press enter to repeat.
- Type any number greater than 0 to quit."
- read QUITHANDLER
- let "NUMBER++"
- done
Advertisement
Add Comment
Please, Sign In to add comment