csh weirdness (HELP!)

Matt Cross mcross at pennies.sw.stratus.com
Tue Aug 14 07:52:32 AEST 1990


In article <1990Aug13.151415.14575 at elroy.jpl.nasa.gov>,
alan at cogswell.Jpl.Nasa.Gov (Alan S. Mazer) writes:
|>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.
|>

Are you using the shell built-in kill?  That would explain the difference.
When I tried it a sun here, it said:

	kill: Arguments should be jobs or process id's.

But, I'm using tcsh.  It seems to me that the internal commands handle the
backquotes differently...  That's as much as I could figure out...

-- 
These are my views, and in no way reflect the views of Stratus Computer, Inc.

Mail to: mcross at es.stratus.com or profesor at wpi.wpi.edu



More information about the Comp.unix.wizards mailing list