initial commit

This commit is contained in:
2021-08-08 21:11:22 +02:00
commit fe7136d801
130 changed files with 6858 additions and 0 deletions

20
bash/raindrops/raindrops.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
function usage() {
echo "Usage: ./raindrop.sh number"
exit 1
}
shopt -s extglob
(( $# == 1 )) || usage
number="$1"
[[ "$number" == +([0-9]) ]] || usage
output=""
(( $number % 3 )) || output+="Pling"
(( $number % 5 )) || output+="Plang"
(( $number % 7 )) || output+="Plong"
echo ${output:-$number}
exit 0