Last active
December 25, 2015 22:39
-
-
Save framon/7051404 to your computer and use it in GitHub Desktop.
Copia data do campo Exif.Photo.DateTimeDigitized para Exif.Photo.DateTimeOriginal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DTD=$(exiv2 -pt "$1" | grep -a Exif.Photo.DateTimeDigitized | awk '{print $4" "$5}') | |
DTO=$(exiv2 -pt "$1" | grep -a Exif.Photo.DateTimeOriginal | awk '{print $4" "$5}') | |
if [ -n "${DTD}" ]; then | |
exiv2 -M"set Exif.Photo.DateTimeOriginal Ascii ${DTD}" "$1" | |
else | |
echo "DTD Blank DTO: " ${DTO} | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment