Congratulations to AcaCandy on her 100,000th post!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot bsod computer connection crash css dell display drive driver drivers email error ethernet excel firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook 2007 outlook express partition problem router slow software sound trojan usb video virus vista windows windows xp wireless
UNIX/Linux
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Operating Systems > UNIX/Linux >
Solved: redirect standard error?


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
surfnschultz's Avatar
Senior Member with 191 posts.
 
Join Date: Nov 2003
23-Feb-2005, 04:35 PM #1
Solved: redirect standard error?
I got this script that puts out an error message and I understand why, but I would prefer to NOT have it go to the screen. How can I redirect in KSH the standard error to /dev/null

Here is my script minus header and config info.

for spid in $(ps -ef | grep "facet "$1 | awk {'print $2'})

do

kill -9 $spid

done
echo All Processes for port $1 have been killed
echo You should be able to login to Dimensions now



I see my two echo requests and they are good, but I get a error since I am killing parent processes, some of the children are gone when it comes to killing them, and I get a error message that reads


kill: 71134: 0403-003 the specified process does not exist

How can I make that go to /dev/null so as not to confuse our users who might use this kill script?

Thanks in advance for any help on this one. OK the race is on will I solve it first?
Headrush's Avatar
Senior Member with 389 posts.
 
Join Date: Feb 2005
Experience: Advanced
23-Feb-2005, 05:31 PM #2
try
Code:
kill -9 $spid 2> /dev/null

Last edited by Headrush : 23-Feb-2005 06:08 PM.
surfnschultz's Avatar
Senior Member with 191 posts.
 
Join Date: Nov 2003
23-Feb-2005, 06:04 PM #3
Thanks
Headrush you DA MAN. Thanks. I had the line under the exectued line so of course it was complaining. working well now.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:26 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.