Skip to content

Instantly share code, notes, and snippets.

@s4parke
Last active October 3, 2019 22:11
Show Gist options
  • Save s4parke/21e83e345eb8fa844ddac3b15c84bf7b to your computer and use it in GitHub Desktop.
Save s4parke/21e83e345eb8fa844ddac3b15c84bf7b to your computer and use it in GitHub Desktop.
Create sidecar files for each photo in a directory.
#!/bin/bash
shopt -s nullglob
PHOTOS=$HOME/tmp/pics/
for p in $PHOTOS/*.jpg
do
echo "Creating XMP sidecar file for $p ...\n"
touch $PHOTOS/$p.xmp.xml
echo "\n\n Creating SHA256 sidecar file for ... $p\n"
openssl dgst -sha256 $p > $PHOTOS/$p.sha.txt
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment