Operating System - HP-UX
1834316 Members
2117 Online
110066 Solutions
New Discussion

Re: how do I input value? shell

 
SOLVED
Go to solution
file system
Frequent Advisor

how do I input value? shell

Hi
shell problem.
I 'm going to exectue in the client
client_name#su - aaa -c "/opt/dsau/bin/csshsetup server_name"

then it gives prompt (yes/no)?
I want to type 'yes' automatically then.

how do I did it?

can you help me?
3 REPLIES 3
Kenan Erdey
Honored Contributor
Solution

Re: how do I input value? shell

Hi,

(sleep 1;echo yes) | su - aaa -c "/opt/dsau/bin/csshsetup server_name"


Kenan.
Computers have lots of memory but no imagination
Steven E. Protter
Exalted Contributor

Re: how do I input value? shell

Shalom

command <yes
EOF

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dennis Handly
Acclaimed Contributor

Re: how do I input value? shell

>csshsetup server_name
>I want to type 'yes' automatically then.

If csshsetup was written correctly, it shouldn't ask you if there is no stdin:
csshsetup < /dev/null

But if that doesn't work, you could try:
yes yes | /opt/dsau/bin/csshsetup server_name