I have a ip camera which saves pics to my rasperry pi's ftp, than the pi uses imagemagick to overlay some text and saves it as webcam.jpg this happens every x minutes via cron
now i want to grab the webcam.jpg and copy it to another directory with continuous numbers like webcam-00001.jpg, webcam-00002.jpg ... this should happen aswell every x minutes
i tried something like
mkdir timelapse
counter=1
ls -1tr *.jpg | while read filename; do cp $filename timelapse/$(printf %05d $counter).jpg; ((counter++)); done
but this only works when there are already a lot of pictures in the folder i need to grab 1 pic every x minutes and save it with a continuous number.
i hope this can be done
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 266
تاريخ: شنبه
2 مرداد
1395 ساعت: 15:51