<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/bin/csh

foreach latest_cam(201????/*.jpg)
   echo $latest_cam
   set short_fname = `echo $latest_cam:t:r | cut -c1-10`
   set year = `echo $short_fname | cut -c1-2`
   set month = `echo $short_fname | cut -c3-4`
   set day = `echo $short_fname | cut -c5-6`
   set hour = `echo $short_fname | cut -c7-8`
   set min = `echo $short_fname | cut -c9-10`
   set sfname = `echo \""20$year/$month/$day $hour":"$min"\"`
   echo "convert -font helvetica -fill yellow -pointsize 12 -draw 'text 150,190 ${sfname}' $latest_cam latest_cam.jpg" &gt; /tmp/cam_label.sh
   chmod u+x /tmp/cam_label.sh
   /tmp/cam_label.sh
   /bin/mv -f latest_cam.jpg $latest_cam
end

exit(0)

</pre></body></html>