So I've been trying to put a timestamp on some images I'm downloading from a webcam, but so far it's been saving the images with the names camera3_date'
here's my line that I enter:
wget --output-document=camera_3‘date +%Y-%m-%d_%H:%M:%S’.jpg [IP]/image.jpg
and then it downloads like such:
--2014-11-25 11:10:28-- [Couldn't Add this FTP link].jpg
=> “camera3_‘date”
Resolving +%y-%m-%d_%h... failed: Name or service not known.
wget: unable to resolve host address “+%y-%m-%d_%h”
--2014-11-25 11:10:28-- [http link .jpg not allowed]
Connecting to [IP]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 447143 (437K) [image/jpeg]
Saving to: “camera3_‘date”
100%[======================================>] 447,143 486K/s in 0.9s
2014-11-25 11:10:29 (486 KB/s) - “camera3_‘date” saved [447143/447143]
FINISHED --2014-11-25 11:10:29--
Downloaded: 1 files, 437K in 0.9s (486 KB/s)
So I'm getting the image I want but I can't save the timestamp correctly, how should I fix this?
wget -o "camera_3$(date +%F_%T).jpg" [IP]/image.jpg
– Stéphane Chazelas Nov 25 '14 at 17:46