gaboshlib/gaboshlib/g_find_image.bashfunc
2022-07-06 12:24:21 +02:00

14 lines
403 B
Bash

#!/bin/bash
function g_find_image {
IFS=$'\n' # for space escapes in path
find $@ -type f | sort | while read g_file
do
mediainfo --File_TestContinuousFileNames=0 "$g_file" > "$g_tmp/g_mediainfo" 2>&1
cat "$g_tmp/g_mediainfo" | egrep -q "^Video$" && continue
cat "$g_tmp/g_mediainfo" | egrep -q "^Audio$" && continue
cat "$g_tmp/g_mediainfo" | egrep -q "^Image$" && echo "$g_file"
done
}