shopt -s nullglob
public shellscript v1 · immutable#!/bin/bashsource=$(zenity --file-selection --directory)filetype=$(zenity --entry --width=300 --title="enter filetype" --text="format : *.doc or *.mp3")shopt -s nullglobif [[ "shopt -s nullglob" == 0 ]]; then echo "this filetype doesn't exist"; ficd $sourcefor files in $filetypedo array=( $files ) echo $filesdone