Skip to content

Instantly share code, notes, and snippets.

@vinayakg
Created September 13, 2020 12:29
Show Gist options
  • Save vinayakg/98bcbacbd04c14231678ef570b3ce3c1 to your computer and use it in GitHub Desktop.
Save vinayakg/98bcbacbd04c14231678ef570b3ce3c1 to your computer and use it in GitHub Desktop.
script for lepton rename
#!/bin/bash
if [ -d $1 ]; then
cd $1
else
echo $1 not found
exit 1
fi
find . -name "*.jpg" | while read f;
do
name=$(basename $f .jpg)
dir=$(dirname $f)
lepton $f
mv "$dir/$name.lep" "$dir/$name.jpg"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment