Trying to figure out a way in my bash script to check if a file is an animated PNG (apng) file. In my case I want to ignore it if it is . Any ideas ?
UPDATE: The answer
First extract the extension of your file using expr.
expr
Check http://tldp.org/LDP/abs/html/string-manipulation.html:
expr match "$string" '.*\($substring\)' Extracts $substring at end of $string, where $substring is a regular expression.
expr match "$string" '.*\($substring\)'
Extracts $substring at end of $string, where $substring is a regular expression.
$substring
$string
Then compare extracted extension with ".png"