I have a bash script which downloads a sql.gz file, extracts it and then import it, however before importing, I drop the existing DB, then import the new DB onto the server.
All is well and the script does what it is supposed to, only one thing :
I have this statement in my bash script :
mysqladmin -uroot -ppassword drop dbname
which then waits for user input to press y or n
to continue.
Is there a way I can input Y
so it always says yes and automatically completes the script.
I am new (v.new) to bash scripts.
Thanks Kind Regards