Evan Martin (evan) wrote in evan_tech,
Evan Martin
evan
evan_tech

teach me something about unix

Can someone explain why this isn't doing what I expect? (This isn't a trick question; I'm honestly confused.)
~$ /usr/bin/mutt -v | head -1
Mutt 1.3.28i (2002-03-13)
~$ /home/martine/local/bin/mutt -v | head -1
Mutt 1.4.1i (2003-03-19)
~$ which mutt
/home/martine/local/bin/mutt
~$ mutt -v | head -1
Mutt 1.3.28i (2002-03-13)

Why is it running the old one?

For context:
~$ alias
alias ls='ls --color=auto'
~$ rehash
bash: rehash: command not found
~$ echo $PATH
/home/martine/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games

And even weirder, if I try to strace it, it runs the right one. Eh?


Update: "rehash" is the csh/zsh command to rehash path lookups, while "hash" is the command used by bash (which I wasn't aware of).
Subscribe

  • dremel

    They published a paper on Dremel, my favorite previously-unpublished tool from the Google toolchest. Greg Linden discusses it: "[...] it is capable…

  • your vcs sucks

    I've been hacking on some Haskell stuff lately that's all managed in darcs and it's reminded me of an observation I made over two years ago now (see…

  • google ime

    Japanophiles might be interested to learn that Google released a Japanese IME. IME is the sort of NLP problem that Google is nearly uniquely…

  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 11 comments

  • dremel

    They published a paper on Dremel, my favorite previously-unpublished tool from the Google toolchest. Greg Linden discusses it: "[...] it is capable…

  • your vcs sucks

    I've been hacking on some Haskell stuff lately that's all managed in darcs and it's reminded me of an observation I made over two years ago now (see…

  • google ime

    Japanophiles might be interested to learn that Google released a Japanese IME. IME is the sort of NLP problem that Google is nearly uniquely…