Skip to content

Instantly share code, notes, and snippets.

@machiq
Last active November 6, 2018 19:44
Show Gist options
  • Save machiq/6ef72ac89e5dc4b66d48a013a6a43caa to your computer and use it in GitHub Desktop.
Save machiq/6ef72ac89e5dc4b66d48a013a6a43caa to your computer and use it in GitHub Desktop.
ExifTool remove all MetaData from JPEGs
#!/bin/bash
#File: stillImage-remove-meta-v003.sh
#
# 2018-11-02 - Matt Crnich - v001 - Use exiftool to remove still image metadata
# 2018-11-06 - Matt Crnich - v002 - quieted output
# 2018-11-06 - Matt Crnich - v003 - added awk to calculate total number of processed files
#
#
echo "enter path"
read path
for srcImagePath in "$path"
do
fileProcTotal=$(find "$srcImagePath" -not -type d -not -path '*/\.*' -type f -name '*.jpg' -exec exiftool -all= {} + | awk '{ sum += $1; } END { print sum; }')
echo "$fileProcTotal" "total files processed"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment