From owner-freebsd-questions@FreeBSD.ORG Thu Jun 10 17:41:35 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F48C106564A for ; Thu, 10 Jun 2010 17:41:35 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail7.sea5.speakeasy.net (mail7.sea5.speakeasy.net [69.17.117.52]) by mx1.freebsd.org (Postfix) with ESMTP id 5B7238FC12 for ; Thu, 10 Jun 2010 17:41:35 +0000 (UTC) Received: (qmail 7676 invoked from network); 10 Jun 2010 17:41:34 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail7.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 10 Jun 2010 17:41:34 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 62F2350824; Thu, 10 Jun 2010 13:41:32 -0400 (EDT) From: Lowell Gilbert To: Dan D Niles References: <1276190395.5437.53.camel@jane.spg.more.net> Date: Thu, 10 Jun 2010 13:41:32 -0400 In-Reply-To: <1276190395.5437.53.camel@jane.spg.more.net> (Dan D. Niles's message of "Thu, 10 Jun 2010 12:19:55 -0500") Message-ID: <44typa3hv7.fsf@be-well.ilk.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: Switched to Bash and Comparison of Shells X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2010 17:41:35 -0000 Dan D Niles writes: > The which command functions differently between bash and tcsh. For > example, I have ls aliased to do color output and add some other options > that I like. With tcsh, 'which ls' returns > "ls: aliased to \ls -GFB"; with bash it returns > "/bin/ls". The tcsh behavior tells you what will be executed when you > run ls. The bash behavior can be achieved in tcsh with 'which \ls', so > I think I like the tcsh behavior better. I could probably write a > function in bash that emulates tcsh's builtin which command. bash (like most other sh-style shells) has no "which" builtin. You end up running /usr/bin/which. bash (like most other sh-style shells) does have a (rough) equivalent, which is "type".