Skip to content

Instantly share code, notes, and snippets.

@framon
Last active December 25, 2015 22:39
Show Gist options
  • Save framon/7051404 to your computer and use it in GitHub Desktop.
Save framon/7051404 to your computer and use it in GitHub Desktop.
Copia data do campo Exif.Photo.DateTimeDigitized para Exif.Photo.DateTimeOriginal
#!/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