Funny kill -9 behaviour
Jim Harkins
jharkins at sagpd1.UUCP
Sat Aug 18 09:37:48 AEST 1990
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 at sagpd1
Iraqnophobia! The talk of the Middle East. Coming soon to a theatre of war
near you.
More information about the Comp.unix.questions
mailing list