summaryrefslogtreecommitdiff
path: root/dicewords
blob: 3a450fac8350719f99c9c74c3b5e3384ff599842 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

count=${1:-6}

if [ "$count" = "-h" ]; then
  echo "Usage: $0 [count]"
fi

egrep '^[a-z]{1,6}$' /usr/share/dict/american-english | shuf | head -n "$count" | tr '\n' '-' | sed -e 's/-$//'
echo