mirror of
https://github.com/rwxrob/dot
synced 2024-11-18 15:25:52 +00:00
25 lines
315 B
Bash
Executable File
25 lines
315 B
Bash
Executable File
#!/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
|