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

25 lines
315 B
Bash

#!/usr/bin/env bash
declare notes=(🎶 🎵 🎤)
randnote() {
local i=$((RANDOM % ${#notes[@]}))
echo ${notes[$i]}
}
sing() {
local what="$(randnote) $* $(randnote)"
echo "$what"
wee "/me sings: $what"
}
if test -n "$*"; then
sing "$*"
exit 0
fi
IFS=
while read -r line; do
sing "$line"
done