Im trying to take a photo with fswebcam and save it in the same place under two names (lol i think i need to explain)
Im taking a photo and i want to save it as webcam.jpg (so i can show it on webpage)
I also want to save the same photo under a different name so i have a copy of all the photos taken.
i have tried the following in a script and ran it every minute by cron BUT this only saves the webcam.jpg.
Its possibly something easy im over looking but any help would be appreciated thank you
Code: Select all
#!/bin/bash fswebcam -r 1280x720 /var/www/html/webcam/webcam.jpg DATE=$(date +"%Y-%m-%d_%H%M") SLEEP(1) cp /var/www/html/webcam/webcam.jpg /var/www/html/webcam/webcam$date.jpg