![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| i cant send mail | dereckfun | HP-UX | 1 | 12-04-2007 09:24 AM |
| Send a mail | garric | Shell Programming and Scripting | 5 | 08-09-2007 09:50 AM |
| send mail after script finishes running | srikanthgr1 | Shell Programming and Scripting | 2 | 04-25-2007 05:22 AM |
| How to prevent job1 from running while job2 is running.. | tikang | UNIX for Advanced & Expert Users | 3 | 09-14-2006 02:40 AM |
| how can i send to printer ? | umen | SUN Solaris | 1 | 02-08-2006 02:40 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
send y /n to a procces after itīs running
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. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Maybe you can try to pipe the output of the yes command to your program, something like:
Code:
yes | yourprogram |
|
#3
|
|||
|
|||
|
thanks, but this not work, because yes send y continuisly, and I need only pass yes when I decide.
Today have found a solution, not for this, but i discoverd that ontpa -l can be used in this form ontape -l -C an this command not change the state of database, with this my problem is rosolved y can invoke ontape -l -C when i need. Thanks for all |
|||
| Google The UNIX and Linux Forums |