Hi,
I have 2 scripts, first.ksh and second.ksh and would like first.ksh to run based on response of 'Y/y' received for second.ksh but in my case it continues to execute 'rm /tmp/list' irrespective of response received, below are my scripts with further info,
Hope I'm making sense
Thanks!
cat /tmp/first.ksh
#!/bin/ksh
/tmp/second.ksh ###Next step should be executed based on /tmp/second.ksh input value, if 'Y/y' then exit without executing next line else continue.
rm /tmp/list
cat /tmp/second.ksh
#!/bin/ksh
if [ -f /tmp/list ]
then
echo "Found LIST..."
echo "Are these values correct: Enter y/Y for YES to CONTINUE or n/N for NO to exit: \c"
read ACCEPT
if [ "$ACCEPT" == "Y" ] || [ "$ACCEPT" == "y" ] ; then
echo ""
else
echo "You have chosen to exit !"
exit
fi
else
echo "LIST does not exist!!"
exit
fi