Skip to content

Instantly share code, notes, and snippets.

@pirxpilot
Created January 30, 2013 06:31
Show Gist options
  • Save pirxpilot/4671190 to your computer and use it in GitHub Desktop.
Save pirxpilot/4671190 to your computer and use it in GitHub Desktop.
Check if PNG file
#!/bin/bash
if test -e $FILE -a $(file -b --mime-type $FILE) = "image/png"; then
echo 'PNG file'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment