initial commit
This commit is contained in:
15
bash/proverb/proverb.sh
Executable file
15
bash/proverb/proverb.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
[[ $# == 0 ]] && echo "" && exit 0
|
||||
|
||||
first="$1"
|
||||
prev="$first"
|
||||
shift
|
||||
while [[ $# > 0 ]]; do
|
||||
cur="$1"
|
||||
echo "For want of a $prev the $cur was lost."
|
||||
prev=$cur
|
||||
shift
|
||||
done
|
||||
echo "And all for the want of a $first."
|
||||
exit 0
|
Reference in New Issue
Block a user