Will it be possible to support something like such in Bash getopts?
#! /bin/bash
while getopts ":t:" opt; do
case $opt in
t)
TAGS+=($OPTARG)
;;
esac
done
shift $((OPTIND-1))
for $tag in "${TAGS[@]}"; do
echo "Tag: $tag"
done
Output:
$ foo.sh -t one -t two
Tag: one
Tag: two