#!/bin/bash file=$1 if $file=0 then echo "Usage' fi if [ -e $file ] then echo "Executing script on file." else echo "File not found." exit fi if [ -x $file ] then echo "File can be run." else echo "File cannot be run, adding execute permission." chmod +x $file exitstatus=$? if [ $exitstatus -eq 0 ] then echo $1 "Sucessfully added execute permission." else echo "Did not sucessfully add execute permission." fi fi echo "--End of Program--" exit