Hello
I�m a senior Unix technician, i have a problem: I need send "y" and "enter" to a proccess that are running in memory. I explain that.
I have a server with Suse 10.3 that it�s runnig informix 11.10, this server are a backup server of a database server, to ensure the integrity of data y need execute a command "ontape -l" this command is interactive, and ask you to send a "yes enter" when you change the backup tape.
Mi problem is that command can interrup, because it�s change the state of database when it�s aborted, well i need make script to execute dayli that send "yes enter" to this proccess.
I try redirectin standard input, but this it�s only valid for one execution, example:
temp.txt
[status printer1
stop printer 2
]
serverBD:/DATA/LOGS # lpc < kk.txt
lpc> hpmater1:
printer is on device 'socket' speed -1
queuing is enabled
printing is enabled
no entries
daemon present
lpc> hpmater11:
printer is on device 'socket' speed -1
queuing is enabled
printing is enabled
no entries
daemon present
but this solution not solve my problem because, i need lpc running always
I try with jobs, making invoke call similar to:
echo "y \n"|fg pid
but I�m not capable to make it works
anyone have a idea?, how i can send "y n" to a proccess that have standar input in shell and can not be aborted never.
Very very thanks.