Switched to Bash and Comparison of Shells
Lowell Gilbert
freebsd-questions-local at be-well.ilk.org
Thu Jun 10 17:41:35 UTC 2010
Dan D Niles <dan at 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".
More information about the freebsd-questions
mailing list