Article 5931K Running bash script from PHP doesn't recognise 'select'

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:
./restoreBakup.sh: 27: select: not found
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:
rick@rick-MS-7C02:~/DBases/Dbmysql$ ./restoreBakup.sh pwd accounts
it runs just fine.

Thanks for any help, Rlatest?d=yIl2AUoC8zA latest?i=beqOx0uxW50:bahxrtkPn78:F7zBnMy latest?i=beqOx0uxW50:bahxrtkPn78:V_sGLiP latest?d=qj6IDK7rITs latest?i=beqOx0uxW50:bahxrtkPn78:gIN9vFwbeqOx0uxW50
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments