From owner-freebsd-current Fri Mar 3 7:56:32 2000 Delivered-To: freebsd-current@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id A0EBF37B613 for ; Fri, 3 Mar 2000 07:56:29 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id KAA73010; Fri, 3 Mar 2000 10:56:26 -0500 (EST) (envelope-from wollman) Date: Fri, 3 Mar 2000 10:56:26 -0500 (EST) From: Garrett Wollman Message-Id: <200003031556.KAA73010@khavrinen.lcs.mit.edu> To: Assar Westerlund Cc: current@FreeBSD.ORG Subject: Re: C shell scripts (was: Re: which(1), rewritten in C?) In-Reply-To: <5lln40qcpj.fsf@assaris.sics.se> References: <20000303005651.A62723@dragon.nuxi.com> <200003030909.KAA72276@hugo10.ka.punkt.de> <20000303073621.A91188@dragon.nuxi.com> <5lln40qcpj.fsf@assaris.sics.se> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG < said: > There's a real reason for not writing this in csh. Because the > built-in function will return results for csh, which might not be the > right ones for other shells. The error is in using `which' with another shell. The correct command to use with POSIX-ish shells (sh, ksh, bash, etc.) is `type'. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message