shopt -s nullglob
array=(*)
Am I right in thinking that the purpose of the first line (shopt -s nullglob) is that in the event that there are unmatched patterns, they aren't added to the array?
I have a directory called unsorted_files.
Now, were I use to array=(*)
Am I right in assuming that is a wildcard, and would return ANY file?
If then I were to specify array=(~/unsorted_files/"*jpg")
Would that then mean, all jpg files within the unsorted_files directory would then be added to the array and populate them as such as elements?
I have put "/*jpg" in between the "" but have been advised that this can cause the code to be ignored