$ ls /bin/bash* | cat -v /bin/bash /bin/bash^M $ file /bin/bash^M : ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.30, dynamically linked (uses shared libs), for GNU/Linux 2.0.30, stripped $ /bin/bash^M Your shell script has DOS linefeeds in it!