tester si le fichier est exécutable bash
if [ -x file ]; then
./file
else
echo "File is not executable"
fi
Alert Alligator
if [ -x file ]; then
./file
else
echo "File is not executable"
fi
file='test.sh'
if [ -x "$file" ]; then
echo "This file is executable: $file"
fi