Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucsd!sdd.hp.com!elroy.jpl.nasa.gov!cogswell!alan From: alan@cogswell.Jpl.Nasa.Gov (Alan S. Mazer) Newsgroups: comp.unix.wizards Subject: csh weirdness (HELP!) Message-ID: <1990Aug13.151415.14575@elroy.jpl.nasa.gov> Date: 13 Aug 90 15:14:15 GMT Sender: news@elroy.jpl.nasa.gov (Usenet) Organization: Image Analysis Systems Group, JPL Lines: 24 Nntp-Posting-Host: cogswell.jpl.nasa.gov Someone came to me with the following problem and I'm clueless. If I type (SunOS 4.0.3) kill `ps | grep a.out | awk '{printf("%d ",$1);}'` to kill every instance of a.out I get `ps | grep a.out | awk '{printf("%d ",$1);}'`: Ambiguous. Any idea why? It's not the $1 (changing that doesn't affect anything), and it works if the command is in a shell script, or if instead of kill one uses /bin/kill. It also works great inside the Bourne shell. Using echo instead of kill produces the expected string of space-separated pid's. I realize that I'm trying to kill the pid of the grep process also. This is careless, but apparently not part of the problem since the subshell should have finished executing by the time the kill starts up. When it does work correctly, it always reports the grep process as already dead. So. Does anyone have any ideas? -- Alan # My aptitude test in high school suggested that ..!ames!elroy!alan # I should become a forest ranger. Sometimes I alan@elroy.jpl.nasa.gov # wonder if that was not indeed my true calling.