Sponsored Content
Top Forums Shell Programming and Scripting send y /n to a procces after itīs running Post 302204311 by dalmus on Wednesday 11th of June 2008 09:00:57 AM
Old 06-11-2008
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.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to prevent job1 from running while job2 is running..

Hi, Please I need your expert advise on how to prevent/lock from execution job1 while job2 is still running in Unix... THanks:) (3 Replies)
Discussion started by: tikang
3 Replies

2. Shell Programming and Scripting

send mail after script finishes running

Hi All, We now have a Log file which has time stamps of all the scripts ran. It has start time and end time. I now have a requirement to send mail to the Admin after the script finishes running. Can some one help me with a Script which will send mail with Start time and End time of the... (2 Replies)
Discussion started by: srikanthgr1
2 Replies

3. Shell Programming and Scripting

Is there a way to ask expect wait for sometime before running the next send command ?

Hi all, After expect catches the string I specify, is there a way to ask expect wait for sometime before running the next send command ? So my script looks like following, expect "some string" #How to ask expect to wait for a while send "next command" The reason I want to do this is... (0 Replies)
Discussion started by: qiulang
0 Replies

4. UNIX for Advanced & Expert Users

send a new value to a variable in a running background process

Hi guys, I have a issue with a background process, I need to update the value of a variable in that process which is running at this time and it will be running for at least 2 days. Any idea? I will apreciate your help. regards. Razziel. (2 Replies)
Discussion started by: razziel
2 Replies

5. UNIX for Advanced & Expert Users

send attachments using send mail in Solaris

Hi All, I have a requirement to send and email of body html with an attachment. concatinating uuencode output to the mail body with mailx command works, but as my Email body is of HTML type i use sendmail. my command to send HTML body is as below: export MAILTO="recipient@domain.com"... (1 Reply)
Discussion started by: mohan_kumarcs
1 Replies

6. Shell Programming and Scripting

Running Total Running Wild

Hi. A shell scripting newbie here. I am trying to write a script that will create a running total of Sales, and increment a counter for each Sales entry, but when I executed the program it never stopped. counter=0 Sales=0 echo "enter sales price" read sales while do let counter=counter+1... (6 Replies)
Discussion started by: Ccccc
6 Replies

7. AIX

Able to send mail without running MTA (sendmail)?

Hi, I am facing a (for me and coworkers) strange behaviour. When I stop sendmail on a plain AIX 5.3 testing box (there is definetly no sendmail process left running anymore), I am still able to send mails to remote addresses via the mail command. I tried that on another box which is not a... (6 Replies)
Discussion started by: zaxxon
6 Replies

8. Shell Programming and Scripting

Script to send email after comparing the folder permissions to a certain permission & send email

Hello , I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them . I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Discussion started by: nairshar
2 Replies

9. UNIX for Beginners Questions & Answers

Grep the 'not running' jobs and will send the update in mail with its name(job)

my request is: i have to create a script , which will grep the 'not running' jobs and will send the update in mail with its name(job) Scenario: logged in to machine abc went to particular path: cd /a/b/c then ./script1.sh status (script.sh is a script,whose status gives info about 10 jobs... (1 Reply)
Discussion started by: learner987
1 Replies

10. UNIX Desktop Questions & Answers

Need to send mail only when the job is not running

I have set up a cron, which will send the mail with not runnnig jobs in the script.sh 15,30,45 * * * * /a/b/c/script.sh | grep not | mail -s "test mail" learner987@gmail.com But i dont want mail when all the jobs are running, but with the above cron i will get mails without the content(if all... (2 Replies)
Discussion started by: learner987
2 Replies
SEND-UUCP(8)						      System Manager's Manual						      SEND-UUCP(8)

NAME
send-nntp, send-ihave - send Usenet articles to remote site SYNOPSIS
send-nntp [ -d ] sitename:hostname | sitename [ sitename:hostname | sitename .. ] send-ihave [ -d ] sitename:hostname | sitename [ sitename:hostname | sitename .. ] DESCRIPTION
The send-* utilities are scripts that process the batch files written by innd(8) to send Usenet articles to a remote NNTP site. The sites to be fed may be specified by giving sitename hostname pairs on the command line. The sitename is the label the site has in the newsfeeds file, the hostname is the real hostname of the remote site, a FQDN (Fully Qualified Domain Name). Normally, the sitename and the hostname are the same, and as such don't have to be specified as sitename:hostname pairs but just as a sitename. send-nntp starts an innxmit to send the articles to the remote site. send-ihave encapsulates the articles in an ihave control message and uses inews to send the articles to a to.sitename pseudo-group. Using send-ihave is discouraged, nobody uses it anymore and even the author of this manpage is unsure as to how it actually works or used to work. send-* expect that the batchfile for a site is named <pathoutgoing in inn.conf>/sitename. To prevent batchfile corruption, shlock(1) is used to ``lock'' these files. OPTIONS
-d The ``-d'' flag causes nntpsend to send output to stdout rather than the log file <pathlog in inn.conf>/<program-name>.log. NOTES
You should probably not use send-nntp, but innfeed, or if that is not possible, nntpsend. The usual flags for a batch file for send-nntp are ``Tf,Wfm''. SEE ALSO
newsfeeds(5), nntpsend(8) SEND-UUCP(8)
All times are GMT -4. The time now is 02:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy