if [[ ${source[1]} == *.asc ]]; then unset 'source[1]' unset 'sha512sums[1]' source=(${source[@]}) sha512sums=(${sha512sums[@]}) fi