Path: utzoo!attcan!uunet!mcsun!hp4nl!tnoibbc!westc!gjoost From: gjoost@westc.UUCP (Gertjan van Oosten) Newsgroups: comp.unix.questions Subject: Re: csh question -- Really kill problem Keywords: csh alias quotes Message-ID: <501@westc.UUCP> Date: 22 Sep 89 08:27:15 GMT References: <498@westc.UUCP> Lines: 47 gjoost@westc.UUCP (Gertjan van Oosten) writes: >The problem concerns csh-aliases (aliasi ??? - David Addison in >'Moonlighting'). >The basic problem is as follows: I want an alias to kill all processes >called 'roy'. The alias is no longer the problem. The problem lies now with 'kill'; see the script below. Script started on Fri Sep 22 10:09:18 1989 % makealias killroy > kr kill `ps ax | grep -w roy | grep -v grep | awk '{print $1}'` ^D % cat kr alias killroy 'kill `ps ax | grep -w roy | grep -v grep | awk '\''{print $1}'\''`' % source kr % alias killroy kill `ps ax | grep -w roy | grep -v grep | awk '{print $1}'` % roy & [1] 9456 % killroy % [1] Terminated roy % roy & [1] 9461 % roy & [2] 9462 % killroy `ps ax | grep -w roy | grep -v grep | awk '{print $1}'`: Ambiguous. % kill `echo 9461 9462` `echo 9461 9462`: Ambiguous. % exit script done on Fri Sep 22 10:12:59 1989 Unless someone has got a solution, I guess I will be needing xargs... :-) Regards, +----------------------------------------------------------------------+ | Gertjan van Oosten mcvax!westc!gjoost | | West Consulting bv | | Phoenixstraat 49 P.O. Box 3318 Tel: +31-15-123190 | | 2611 AL Delft 2601 DH Delft Fax: +31-15-147889 | | The Netherlands | +----------------------------------------------------------------------+ "But due to a terrible miscalculation in size, the entire fleet got swallowed by a small dog" - The Hitchhiker's guide to the Galaxy