I am new to Shell Scrpting but I am learning quickly. My script looks as follows:
su - postgres
echo "Please enter the password for a2billing user and confirm it: "
createuser -W -S -d -r -e a2billinguser
createdb -e -O a2billinguser a2billing
With above, the script should prompt for a password to create a user and then ask for the same password again to create database. However, my output stops after using command "su - postgres". What can I do to curb this? is there an alternative?