Script running from another script issue

Hello All,

I am ruuning the below script.

userchecking.sh
###########################

#! /bin/ksh
NIS_SCRIPT_HOME="/mot/systems/NIS_SCRIPT_NEW"
. $NIS_SCRIPT_HOME/common.env
WORK_DIR="/mot/systems/scripts/"
#WORK_DIR="/mot/b36376/myscripts/nis_user_automation"
NIS_SERVER="cde-zin10-tta02"
AREA_DETAIL_FILE=$WORK_DIR/user.txt
CURR_TIME=`date +%m-%d-%Y-%R`
cd $WORK_DIR

cat $AREA_DETAIL_FILE|grep -v "^#">/tmp/users_tmp

while read inputline
do

    echo "creating NIS User account"
    echo $inputline
#     /mot/systems/NIS_SCRIPT_NEW/make_nis_account_ankit.sh $inputline
     env>>/tmp/ankit2
     /mot/systems/NIS_SCRIPT_NEW/make_nis_account_ankit.sh b10873
     echo $inputline
   perl -i -wnl -e '/^('$inputline')/ and print "#$1 - CREATED on '$CURR_TIME'" or print' $AREA_DETAIL_FILE

done</tmp/users_tmp


rm /tmp/users_tmp

#################################

Its calling another script make_nis_account_ankit.sh & passing a parameter.The strange thing i see is when i am running make_nis_account_ankit.sh independently its running fine but when i am calling from userchecking.sh it throwing syntax errors.
I am running both the scripts as sudo.

Can anyone help me out in this why its happening.

Regards

Ankit

If make_nis_account_ankit.sh is not executable or lacks a valid first line #!, then the sh will process it as stdin, see man execvp.