./check.sh: line 3: firstscript: command not found ./check.sh: line 4: secondscript: command not found #### -e file True if file exists. -f file True if file exists and is a regular file. -r file True if file exists and is readable. -s file True if file exists and has a size greater than zero. -O file True if file exists and is owned by the effective user id. -G file True if file exists and is owned by the effective group id. #### -x file True if file exists and is executable. #### #!/bin/bash echo -e "received arguments >$*<" filename=$1; script1='fristscript'; # use absolute path script2='firstscript'; # use absolute path if [ -f $filename ] ; then echo -e "executing scripts $script1, $script2"; if [ -x $script1 ]; then echo -e "executing $script1..." $script1 $filename else echo -e "$script1 not found"; fi if [ -x $script2 ]; then echo -e "executing $script2..." $script2 $filename else echo -e "$script2 not found"; fi else echo -e "$filename is not readable or doesn't exist"; fi