Too much shell religion for me!
Everyone knows you should be doing inside Emacs with elisp! ;) [dodging tomatos]
You might try installing tcsh, if you can. It is upwards compatible
from csh, and might offer help.
You mentioned filezilla. I've noticed problems in Cygwin, when I run
scripts with DOS CRLFs.
Hmm. I hope Mac OSX now uses \Ns.
You can also try tr or sed.
Of course, if you use Emacs, you'll see all CRLF line endings :)
Another thing that can go wrong, is if you have changed the alias of
ls. You should never run scripts with aliased commands, but it happens
all the time.
What happens, when you do
(solve the problem by breaking it apart)
Note the leadiing '\'
You could also try `unalias`
As regards your prompt, try
echo $PS1 #sh syntax?
Look at startup files, in particular
There could even be trouble in your X Window startup files, or,
shudder, /etc/rc/* daemons