How do create a user with a bashscript - Mailing list pgsql-novice

From A B
Subject How do create a user with a bashscript
Date
Msg-id dbbf25900809190011v79ecec19rc142f14e991441b@mail.gmail.com
Whole thread Raw
Responses Re: How do create a user with a bashscript
Re: How do create a user with a bashscript
List pgsql-novice
Hi.
I want to create a user with the  createuser  command and supply the
password at the command line in a script, like this

#!/bin/bash
createuser  myuser

but I want to supply a password on the command line, is that possible?
The docs tells me no, but does anyone know of a workaround?

pgsql-novice by date:

Previous
From: "G. J. Walsh"
Date:
Subject: scope of connection id (handler)
Next
From: "Sean Davis"
Date:
Subject: Re: Moving data from one set of tables to another?