find file type in directory linux code example
Example: find file type linux script
#! /bin/sh
if [ -f "$1" ] && [ "`file -b --mime-type \"$1\"`" = "image/jpeg" ]; then
echo "Good type for the file (JPEG)"
fi
#! /bin/sh
if [ -f "$1" ] && [ "`file -b --mime-type \"$1\"`" = "image/jpeg" ]; then
echo "Good type for the file (JPEG)"
fi