How get rid of kill output message?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How get rid of kill output message?
# 1  
Old 07-28-2010
Question How get rid of kill output message?

Hi,

My problem is the following, I have a little shell script that has a couple of functions... in one function I start an app like this...

Code:
runmqtrm -m $ourManager -q $ourMQSYS.EVTINITQ 1>/dev/null 2>&1 &

In another function I kill that app using
Code:
kill -s SIGKILL $triggerMonitorPID 1>/dev/null 2>&1

The thing is that I don't want any output when I kill that app, but I get the following:
Code:
./explode: line 67: 11932 Killed                  runmqtrm -m $ourManager -q $ourMQSYS.EVTINITQ 2>/dev/null

What can I do to avoid that output ?
# 2  
Old 07-28-2010
MySQL reply message

Hi,


I go through i think u should write like below..

runmqtrm -m $ourManager -q $ourMQSYS.EVTINITQ 1&2>/dev/null
kill -s SIGKILL $triggerMonitorPID 1&2>/dev/null
Please try this.I think it will work..
# 3  
Old 07-28-2010
if using the ksh, try 'set +b'. See 'man ksh' for details.
# 4  
Old 07-29-2010
Thank you for the reply.

Did that, doesn't work.
# 5  
Old 07-30-2010
try this
Code:
 
runmqtrm -m $ourManager -q $ourMQSYS.EVTINITQ & triggerMonitorPID=$! 1>/dev/null 2>&1
kill -s SIGKILL $triggerMonitorPID &>/dev/null

# 6  
Old 07-30-2010
Nope...


./explode: line 70: 14267 Killed runmqtrm -m $ourManager -q $ourMQSYS.EVTINITQ
# 7  
Old 07-30-2010
Quote:
Originally Posted by valiadi
Nope...


./explode: line 70: 14267 Killed runmqtrm -m $ourManager -q $ourMQSYS.EVTINITQ
which of shell use?
ksh or ksh93 or other?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get rid off Password expiry error message when connecting to sql in script?

I am connecting to sql databases through shell script. Databases that i am connecting will need password change every 60 days. This is according to our security policy and cannot be changed. But this is creating problem when connecting to Databases through shell script . To connect to oracle DB we... (2 Replies)
Discussion started by: pallvi_mahajan
2 Replies

2. Shell Programming and Scripting

Trying to get rid of a duplicate output line...

Hi folks, I'm trying to work on a script that will grab a router interface report and generate the numbers of "in use" and "un-used" ports per device. Right now, I've got a cut down of the report as follows: sing /usr/apps/siteName/etc/DCAFT-9K.cmds for send text Connecting using... (11 Replies)
Discussion started by: Marc G
11 Replies

3. Programming

kill() function problem in client-server ipc message using 2 FIFOs

I want to have a message send & receive through 2 uni-direction FIFO Flow of data FIFO1 stdin--->parent(client) writefd--->FIFO1-->child(server) readfd FIFO2 child(server) writefd2---->FIFO2--->parent(client) readfd2--->stdout I need to have boundary structed message... (3 Replies)
Discussion started by: ouou
3 Replies

4. Shell Programming and Scripting

Bash script show Kill system output

Hi we are calling kill -9 $pid command from bash script it gives below output, but we need to hide the output. i tried /dev/null but ni luck. is there any alternate way to schive this. ../kill_scr.sh: line 42: 1891 Killed /tmp/anr_rest_mul_wc.sh Soalris 10. ... (2 Replies)
Discussion started by: sachinbutala
2 Replies

5. AIX

kill -3 <PID> ... where the output file goes?

Hi all, I am generating the coredump of my JBoss, and by default it puts it in to a particular directory. i.e. JBOSS_HOME/. I would like this output file to be created, lets say in /tmp/dump/. I tried the following: kill -3 9404940>/tmp/dump/out.txt But it created... (3 Replies)
Discussion started by: haroon_a
3 Replies

6. UNIX for Dummies Questions & Answers

Send output of grep as input of kill command

I would appreciate any help. I need to run 'ps -ef | grep 'process', get the process id and kill that process. I have got this far: - Get pid using ps -ef | awk '/process/{ print $2}' after this I'm kind of stuck.. - Use pipe to redirect the output to kill pid=ps -ef | awk '/bmserver/{... (2 Replies)
Discussion started by: foxtron
2 Replies

7. UNIX for Dummies Questions & Answers

routing kill output from console to file

Hi , I am using the following command kill -3 pid ----which will return the thread dump. I want redirect this to file. I tried like the following two ways. kill -3 9843 >> srini.log kill -3 9852 >> srini 2>&1 But those two cases are failed :mad: pls let me knwo is there any... (2 Replies)
Discussion started by: srinivsa
2 Replies

8. Shell Programming and Scripting

How could I disable "kill" confirmation message

Hello every body, Before terminating a script by saying "Good Bay", I need to kill all child processes which I already done successfully. The problem is: users of the scripts still see the confirmation message as it can be seen below: =========================================================... (2 Replies)
Discussion started by: SultanKSA
2 Replies

9. Shell Programming and Scripting

How to get rid of message when script kills process it started?

When I run the following script I get the following error message whcih I would like to suppress when the kill is issued: ./kill.sh: line 13: 31854 Killed nc -l -p 12345 Script: #!/bin/bash echo running nc in the background nc -l -p 12345 & PID=$! echo nc pid: $PID ... (1 Reply)
Discussion started by: cmarkle
1 Replies

10. Shell Programming and Scripting

Can I avoid the standard output from kill command

I am sending a kill comand to kill a process inside a SH script but I don`t want the user to notice it so I donīt want the message "1222 killed" to appear. I`ve tried to redirect the standard output to /dev/null 2>&1 and also tried to use "nohup" but none of them was succesfull. Can anyone... (1 Reply)
Discussion started by: pguinal
1 Replies
Login or Register to Ask a Question