A collection of my scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
387 B

  1. #!/bin/bash
  2. if [ -z "$1" ]
  3. then
  4. echo "Please specify how many random words would you like to generate!" 1>&2
  5. echo "example: $0 3" 1>&2
  6. echo "This will generate 3 random words" 1>&2
  7. exit 0
  8. fi
  9. # Get the required number of words, convert it from a list of one word per line to one line with all
  10. # the words and then copy to clipboard.
  11. shuf -n "$1" /usr/share/dict/words | tr "\n" " "