Bash script show Kill system output


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Bash script show Kill system output
# 1  
Old 02-02-2011
Error 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.

Code:
../kill_scr.sh: line 42:  1891 Killed                  /tmp/anr_rest_mul_wc.sh

Soalris 10.

Regards,
Sachin
# 2  
Old 02-02-2011
didn't it work?
Code:
kill -9 ...  &> /dev/null

# 3  
Old 02-02-2011
No, >dev/null didn't help
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Student system BASH script

Hi guys, i'm beginner with Unix, I tried my best, but I Really don't know how to finish it :D. here's my problem : I have to do something like Student system - student's name | subjects | mark |credits. after starting script it will ask you for Student's name, then which subject, then the... (2 Replies)
Discussion started by: PrincMehi
2 Replies

2. Shell Programming and Scripting

Need bash script to ping the servers and rename the output file each time the script is ran

HI, I have a file serverlist in that all host names are placed. i have written a small script #./testping #! /bin/bash for i in `cat serverlist` do ping $i >> output.txt done so now it creates a file output.txt till here fine.. now each time i run this script the output file... (4 Replies)
Discussion started by: madhudeva
4 Replies

3. Shell Programming and Scripting

Script that will show output starting from 24-hours earlier to present

Hi Guys, Good day! I hope you could help me on this, I have a file that conatins output upon executing cat /var/log/messages, then what I want is to get the logs that has been generated only starting from 24-hours earlier at the time of actual execution of the script. Is this possible? Best... (9 Replies)
Discussion started by: rymnd_12345
9 Replies

4. Shell Programming and Scripting

Running a script in system() call and want the script's output

Hi All, I have a script(sample.sh) displaying the output of "dd" command. Now i am using this script in system() call as, system("sh sample.sh") in an application file. I want the output of system("sh sample.sh") in the application file itself. How can i get it? Many thnaks.... (9 Replies)
Discussion started by: amio
9 Replies

5. Shell Programming and Scripting

Bash As System Script

My main machine is set-up so that I configure the network details (IP etc) by command line. However I'm trying to create an bash script to run those commands upon system startup. Problem I have is that the commands require root access and I want it to be fully automatic. Now I figure I need to... (5 Replies)
Discussion started by: jkraw90
5 Replies

6. Shell Programming and Scripting

Show pages on a script's big output

Hi again: I have this code which gives an large output(several screens), and I want to display on screen at a time (like more does)....how can I do this? echo echo "Los roles en el sistema son:" echo lsrole -a dfltmsg ALL|sed 's/dfltmsg=/Descripcion=/' thanks Israel. (4 Replies)
Discussion started by: iga3725
4 Replies

7. SuSE

Write shell script using menu-driven approach to show various system

QUESTION: Write shell script using menu-driven approach to show various system configuration like 1) Currently logged user and his logname 2) Your current shell 3) Your home directory 4) Your current path setting 5) Your current working directory 6) Show Currently logged number of... (1 Reply)
Discussion started by: bboyjervis
1 Replies

8. Shell Programming and Scripting

Logging ALL standard out of a bash script to a log file, but still show on screen

Is it possible to store all standard-out of a bash script and the binaries it calls in a log file AND still display the stdout on screen? I know this is possible to store ALL stdout/stderr of a script to a single log file like: exec 1>&${logFile} exec 2>&1 But running a script with the... (3 Replies)
Discussion started by: ckmehta
3 Replies

9. Shell Programming and Scripting

Kill -9 within Bash script kicks out usage info

I have a start|stop|restart script for a custom app we have. After it tries to stop our process the correct way, it checks to see if it's gone, if not it tries to kill it, if that doesn't work kill -9. If I run kill -9 on the PID from the command line it kills it and all is well. If I have the... (1 Reply)
Discussion started by: mglenney
1 Replies

10. Shell Programming and Scripting

Why generate "ash and bash" different output for same bash script?

Hi, For my bash script, terminal with bash is generate an OK output and program works right. already, terminal with ash have "line 48: syntax error: Bad substitution" output and program don't work. :confused: (0 Replies)
Discussion started by: s. murat
0 Replies
Login or Register to Ask a Question