Hey, guys, scripting newb here. I'm trying to get a list of all .dmg files in a folder and save the output into an array. My first attempt was
ARRAY= ( `ls $REIMAGEPATH | grep \.dmg$` )
However, I understand why that doesn't work now (at least I think I do).
But I don't know what the best method is to do this. Some have suggested using a for loop, others using find. But in either case, I can't figure out how to pass the input to an array.
In case it helps, the purpose of the full script is to find all .dmg images in a folder, partition a hard drive with that number of partitions, and restore each image onto the corresponding partition. I've worked out most of it, but the lynchpin is being able to generate the list in the first place! Thanks!