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_3date +%Y-%m-%d_%H:%M:%S.jpg [IP]/image.jpgand then it downloads like such:--2014-11-25 11:10:28--  [Couldn't Add this FTP link].jpg           => camera3_dateResolving +%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 OKLength: 447143 (437K) [image/jpeg]Saving to: camera3_date100%[======================================>] 447,143      486K/s   in 0.9s2014-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?
How do I put a time stamp with: wget --output-file=[FILENAME] [URL]
shell;date;wget
You have to use backticks (`) instead of fancy quotes ().wget --output-document=camera_3`date +%Y-%m-%d_%H:%M:%S`.jpg [IP]/image.jpgOr better yet use the sub command notation, $(...).wget --output-document=camera_3$(date +%Y-%m-%d_%H:%M:%S).jpg [IP]/image.jpgAdditionally you can simply the formatting to date like so:wget --output-document=camera_3$(date +%F_%T).jpg [IP]/image.jpgThe date macros %F and %T are shorthand for the %Y-%m-%d and %H:%M:%S formats.