Running bash script from PHP doesn't recognise 'select'
by pizzipie from LinuxQuestions.org on (#5931K)
Running the attached script from php within firefox browser creates error.
Quote:
Here is part of restoreBakup.sh
Code:echo "-- Start"
echo
echo -- Restoring $database --
echo
PS3='Pick a Database to Restore ... '
select bakup in $(ls -d "$folder"/* )
do
break
done
echo
echo $bakup | awk -F/ '{print $7}'
echo
mysql -urick -p$passwd < $bakup
echo "-- Finish"If I run this from the terminal
Quote:
it runs just fine.
Thanks for any help, R


Quote:
./restoreBakup.sh: 27: select: not found |
Code:echo "-- Start"
echo
echo -- Restoring $database --
echo
PS3='Pick a Database to Restore ... '
select bakup in $(ls -d "$folder"/* )
do
break
done
echo
echo $bakup | awk -F/ '{print $7}'
echo
mysql -urick -p$passwd < $bakup
echo "-- Finish"If I run this from the terminal
Quote:
rick@rick-MS-7C02:~/DBases/Dbmysql$ ./restoreBakup.sh pwd accounts |
Thanks for any help, R