Date: Thu, 10 Jun 2010 13:41:32 -0400 From: Lowell Gilbert <freebsd-questions-local@be-well.ilk.org> To: Dan D Niles <dan@more.net> Cc: freebsd-questions@freebsd.org Subject: Re: Switched to Bash and Comparison of Shells Message-ID: <44typa3hv7.fsf@be-well.ilk.org> 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") References: <1276190395.5437.53.camel@jane.spg.more.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Dan D Niles <dan@more.net> 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".
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44typa3hv7.fsf>