I am trying to execute a script and its throwing "File Not Found" error. Below is my script
#!/usr/bin/ksh
export ROOT_ENV=dev
export ROOT_DIR=/files/$ROOT_ENV/windows/mp
export SRC_DIR=$ROOT_DIR/mp1
mail_id='abc@xyz.com'
if [[ -e "$SRC_DIR"/*_PO ]]
then
echo "File exist"
exit 0
else
echo "File not found"
exit 1
echo "Hello User,
File does not exist in the "$SRC_DIR".
Please place the file in the path : "$SRC_DIR"
Thanks,
Team
" | mail -s "Warning: <"$ROOT_ENV="> <INFA> <PACK> FILE DOES NOT EXIST in path '$SRC_DIR'" $mail_id
echo "File does not exist"
fi
done
Appreciate if some one can help here. Thanks,