I'm new to Bash scripting and am having a difficult time with creating a script that takes all the jpg files from a directory (assuming all of them are jpg) and creating a timeline of images according to their modification date.
I've tried so far:
ls -Rt *.jpg | convert -append jpgfile
and
convert -append $(ls -Rtr $(find MontrealTest -name *.jpg)) MontrealTest.jpg
The bash program should create a timeline of images in q3_image_sorter.bash from oldest to newest. convert -append
can be used to create the timeline image made of N image name arguments. N-1 are treated as inputs, to be read and stacked vertically and the final (Nth) argument is the output
filename. time-line image should match the path given as the first argument, but _ to replace any slashes. ex.
$ bash q3_image_sorter.bash Q3/SimpleTest
outputs fileQ3_SimpleTest.jpg
. * recommended to useeog
to view the files
These are the list of jpg files, and I need to convert them to the images. For example, when I run bash q3_image_sorter.bash Q3/MontrealTest
I will get the 8 images from oldest to newest.