Evan Martin (evan) wrote in evan_tech,
Evan Martin

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
~$ 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

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).
  • Post a new comment


    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.