myarr=(~/somedir/*)
Combine with shopt -s nullglob
to handle no matching files. Reference the bash manual, which says:
If set, Bash allows filename patterns which match no files to expand to a null string, rather than themselves.
myarr=(~/somedir/*)
Combine with shopt -s nullglob
to handle no matching files. Reference the bash manual, which says:
If set, Bash allows filename patterns which match no files to expand to a null string, rather than themselves.