I am trying to use the shell to loop sequentially through images in one folder and compare with the latest image in another folder.
One error i'm getting is -
zsh: no matches found: /TiffOut/*.tiff(.om[1])
Though I wouldn't be surprised if thats not the only problem.
What I'm hoping to acheive is:
- Loop through all source images in current directory:
- Put most recent file from TiffOut subdirectory in variable 'latest'
- Compare current source, and latest output with '-evaluate-sequence max' to create new tiff with the brightest parts from each image_file
- Save to TiffOut subdirectory
Heres my full script -
#! /bin/zsh -
filelist=$(ls | grep '.tiff')
for image_file in $filelist
do
latest=$(/TiffOut/*.tiff(.om[1]))
magick $image_file $latest -evaluate-sequence Max '/TiffOut/out_${imagefile}.tiff'
done
Thanks for reading