for example for photos from a camera (IMG_xxxx.JPG
): ./missing-files-in-sequence.sh '*IMG_' 3409 '.jpg'
Last active
September 7, 2022 08:17
-
-
Save pretorh/5d2dbcfb15b498022d34f26a10609d1b to your computer and use it in GitHub Desktop.
List missing sequentially numbered files
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
#!/usr/bin/env sh | |
set -e | |
prefix=$1 | |
sequence=$2 | |
suffix=$3 | |
item=$sequence | |
while true ; do | |
name="$prefix$item$suffix" | |
printf "%s\r" "$name" | |
if [ -z "$(find . -name "$name")" ] ; then | |
echo "missing: $name" | |
fi | |
item=$((item + 1)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment