>echo 'createuser becky -d -a' | su postgres
maybe you'd like it the otherway round? ;)
$ su - postgres -c "createuser becky -d -a"
Stefan
-- "On the Internet, there is no 'they'. There's only a very,very large 'us'." --- Douglas Adams