Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!swrinde!ucsd!ucselx!berick!optigfx!crash!ncr-sd!sagpd1!jharkins From: jharkins@sagpd1.UUCP (Jim Harkins) Newsgroups: comp.unix.questions Subject: Funny kill -9 behaviour Message-ID: <909@sagpd1.UUCP> Date: 17 Aug 90 23:37:48 GMT Organization: Scientific Atlanta-GPD, San Diego Lines: 29 Due to inattention on my part I managed to create a bunch of processes I needed to kill. Rather than typing 'kill -9 number-list', I tried: kill -9 `ps -aug | grep ekg | awk '{print $2}'` To which I was rewarded with `ps -aug | grep ekg | awk '{print $2}'`: ambiguous. After playing around a bit I realized the problem lay with the kill -9, by replacing it with echo I got a list of process numbers. I redirected the ps ... awk output into foo, then tried kill -9 `cat foo` and got `cat foo`: ambiguous. What I want to know is why in the hay does this happen? FYI, I killed the turkeys with a foreach i (`cat foo`) loop in which I kill -9'd the $i's. Also, I'm on a Sun running 4.3 bsd. -- jim jharkins@sagpd1 Iraqnophobia! The talk of the Middle East. Coming soon to a theatre of war near you.