Skip to content

Instantly share code, notes, and snippets.

@glw
Created October 24, 2017 16:04
Show Gist options
  • Save glw/6d4f6bb796e3989fcb95807a5db3e7f7 to your computer and use it in GitHub Desktop.
Save glw/6d4f6bb796e3989fcb95807a5db3e7f7 to your computer and use it in GitHub Desktop.
Search for each TIF and return wether it is valid or not
echo "file, output" > output.csv;
TIFS=$(find . -name '*.TIF');
for f in $TIFS; do
output=$(tiffinfo.exe $f 2>&1 | grep 'Cannot read TIFF header');
echo "$f, $output" >> output.csv;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment