How to write a script which will take in the password automatically?
Hi,
I have a script under /etc/init.d/jboss When I start the Jboss under my user account (assumed test) I type: Code:
[test ~]#/etc/init.d/jboss start Code:
Password: I find this is quite boring. So I want to write a script locally (assumed called myJboss) so when I want to start the Jboss I just type in: Code:
[test ~]#myJboss start [password] Regards Thomas |
http://linux.die.net/man/1/expect
I believe this is relevant to your issue. I've never had to use it though, so I'm unsure of how to give you an example. |
All times are GMT -5. The time now is 11:31 PM. |