#!/bin/zsh while getopts ":l" opt; do; case $opt in l) label=1 ;; *) exit 1 esac; done cycle=( artist track album group ) src=$(= length )); then next=1 else (( next = place + 1 )) fi printf '[[%s:%s]]' ${cycle[$next]} $value