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?
# 8  
Old 07-30-2010
Quote:
Originally Posted by ygemici
try this
Code:
 
runmqtrm -m $ourManager -q $ourMQSYS.EVTINITQ & triggerMonitorPID=$! 1>/dev/null 2>&1
kill -s SIGKILL $triggerMonitorPID &>/dev/null


I think it should be

Code:
 
runmqtrm -m $ourManager -q $ourMQSYS.EVTINITQ & triggerMonitorPID=$! 2>/dev/null 1>&2
kill -s SIGKILL $triggerMonitorPID 2>/dev/null 1>&2

Try this..

---------- Post updated at 05:34 PM ---------- Previous update was at 05:31 PM ----------

Quote:
Code:
runmqtrm -m $ourManager -q $ourMQSYS.EVTINITQ & triggerMonitorPID=$! 1>/dev/null 2>&1
kill -s SIGKILL $triggerMonitorPID &>/dev/null

I think it should be
Code:
runmqtrm -m $ourManager -q $ourMQSYS.EVTINITQ & triggerMonitorPID=$! 2>/dev/null 2>&1
kill -s SIGKILL $triggerMonitorPID 2>/dev/null 1>&2

# 9  
Old 07-30-2010
Why do you think about? what did you change it?

1>/dev/null 2>&1 --> stdout redirect null and stderror redirect stdout
&>/dev/null --> both of stdout and stderror to null

your suggestion
2>/dev/null 1>&2 -->
as result both of fd s goes to /dev/null Smilie


our issue is job messages in shell
my goal is actually escape the shell messages
i think maybe if i take the background job pid and and kill $pid
maybe escape the this message,,

this message is actually is not "kill command any output"
this is shell message so job completion messages
because the we want to kill the job in background and when kill it our shell is output warning message Smilie

now we try
Code:
# nohup runmqtrm -m $ourManager -q $ourMQSYS.EVTINITQ & triggerMonitorPID=$! 1>/dev/null 2>&1
kill -s SIGKILL $triggerMonitorPID >/dev/null 2>&1

or
Code:
# ksh explode


Regards
ygemici
# 10  
Old 08-02-2010
Quote:
Originally Posted by ygemici
which of shell use?
ksh or ksh93 or other?
The version is

Code:
$ Version M-11/16/88i



---------- Post updated at 08:57 AM ---------- Previous update was at 07:52 AM ----------

nohup doesn't do the trick...I still can see the killed messages...

Quote:
Originally Posted by ygemici
Why do you think about? what did you change it?

1>/dev/null 2>&1 --> stdout redirect null and stderror redirect stdout
&>/dev/null --> both of stdout and stderror to null

your suggestion
2>/dev/null 1>&2 -->
as result both of fd s goes to /dev/null Smilie


our issue is job messages in shell
my goal is actually escape the shell messages
i think maybe if i take the background job pid and and kill $pid
maybe escape the this message,,

this message is actually is not "kill command any output"
this is shell message so job completion messages
because the we want to kill the job in background and when kill it our shell is output warning message Smilie

now we try
Code:
# nohup runmqtrm -m $ourManager -q $ourMQSYS.EVTINITQ & triggerMonitorPID=$! 1>/dev/null 2>&1
kill -s SIGKILL $triggerMonitorPID >/dev/null 2>&1

or
Code:
# ksh explode


Regards
ygemici
# 11  
Old 08-02-2010
Quote:
Originally Posted by valiadi
The version is

Code:
$ Version M-11/16/88i

---------- Post updated at 08:57 AM ---------- Previous update was at 07:52 AM ----------

nohup doesn't do the trick...I still can see the killed messages...
add the this code before the kill commd and try again
Code:
set +m

and let see what happen
# 12  
Old 08-03-2010
Still not working Smilie

Code:
+++ Generating & importing our modified MQSC file

+++ Changing ICE-XS settings

Sending output to nohup.out
##########################################################
            EXPLODE - Tue Aug  3 01:30:37 2010
##########################################################
^C
Signal 2 caught...

+++ Restoring ICE-XS settings

./explode: line 70: 15399 Killed                  nohup runmqtrm -m $ourManager -q $ourMQSYS.EVTINITQ

+++ Restoring the QUEUE original settings

+++ Done

Quote:
Originally Posted by ygemici
add the this code before the kill commd and try again
Code:
set +m

and let see what happen
# 13  
Old 08-03-2010
Code:
command  >/dev/null 2>&1

# 14  
Old 08-03-2010
Already tried it Smilie

Quote:
Originally Posted by skles
Code:
command  >/dev/null 2>&1

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