I am trying to run a program that needs to call several other programs, but the which command at the beginning damages the executables it tries to call.
I get the same issue if I run "which" straight from the command line:
$ which samtools > ~/samtools-0.1.18/samtools
Doing this erases the samtools executable and replaces it with the which command output (/usr/bin/samtools) in a text file of the same name.
I get this result when running it on VMware Ubuntu 11.10 32 bit and also when running it on Ubuntu 12.10 64 bit. The error occurs with calling "which" on other programs as well, not just the example above.