initial commit of bin scripts into git

This commit is contained in:
2023-11-08 13:38:19 +11:00
commit 3735eea3c6
113 changed files with 11631 additions and 0 deletions

16
names_out_of_a_hat.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
num=$#
ARGV=( "$@" )
if [ $num -lt 2 ]; then
echo "need a list of names to choose from"
exit 1
fi
r=$(( ( RANDOM % $num ) ))
echo -n "And the winner is number $r: "
echo "${ARGV[$r]}"