how can I write a command line answer, for example if I want to make a script to input a password for a user,
just like this "passwd pgsql" , but I want to write the password in the script .
I means how can I input the y y in shell script , not input
by user
$ createuser talky2
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) y
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.