Files
exercism/bash/proverb/proverb.sh
2021-08-08 21:11:22 +02:00

16 lines
251 B
Bash
Executable File

#!/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