Last active
December 1, 2022 05:23
-
-
Save zerorooot/b8f2e8faf41192f4463a44a7ce2b3555 to your computer and use it in GitHub Desktop.
print video time when time < sometime
This file contains hidden or 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
#!/bin/bash | |
( | |
IFS=$'\n' | |
for i in $(find -type f) | |
do | |
time=$(mediainfo -f $i | grep Duration |cut -d":" -f2 | head -1 | cut -d "." -f1) | |
min=480000 | |
if [ ! -n "$time" ]; then | |
echo "$i IS NULL" | |
else | |
if [[ $time -le $min ]]; then | |
echo $i $time | |
#echo $i >>a.txt | |
#rm -rf $i | |
fi | |
fi | |
done | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment