On Mon, Mar 28, 2011 at 10:53:21AM -0700, Linda Walsh wrote: > if [ ! -e $d/S??sshd ]; then echo "sshd not enabled"; fi
That will fail quite colorfully if the glob matches multiple files. (Also, "$d" should be quoted.) On IRC we recommend enabling nullglob, pulling the results of the glob into an array, and then checking its length. shopt -s nullglob files=("$d"/S??sshd) if (( ${#files[@]} > 0 )); then ... See also http://mywiki.wooledge.org/BashFAQ/004 In any case, I see no benefit to changing how [[ works. A change would just cause more confusion.