su using here document

Posted by user32206 on Super User See other posts from Super User or by user32206
Published on 2010-03-24T17:16:28Z Indexed on 2010/03/24 17:23 UTC
Read the original article Hit count: 320

Filed under:
|

file: test.sh

who
su superuser <<BELUGA
mysuperpassword
BELUGA
who

$ ./test.sh

just waits for input. What am I doing wrong? Is there a way to automate this?

© Super User or respective owner

Related posts about linux

Related posts about solaris