08-23-2006, 02:28 AM
Quote:This never showed in vi. Bleh. I used an online Dos2Unix converter to strip the \r and it works now.
Thanks guys!
-Bolty
Your vim must not be configured right.:) You can configure it to announce the file format when it loads, or you can query it once vim is open. Once you've opened the file, do ":set fileformat?". The question mark indicates you want to know the value of the option, rather than actually set it. Vim will respond with " fileformat=dos" or " fileformat=unix" as appropriate. You can also use ":set fileformat=unix" to switch the line ending type. Many Linux systems also ship with dos2unix for fixing this on-system (without needing to go online).
Spurious carriage returns are very common when you upload files from systems with broken line ending conventions (most notably, Microsoft Windows suffers from this). Old Macintoshes tended to use carriage returns without line feeds; this may have been fixed with OSX since it uses a BSD userland now.
Incidentally, that bash looks a bit old. What do you get when you run "uname -a"? I'd expect bash 3.00 on a new distribution. If you're running something older, be sure the admin is keeping up to date on kernel patches. There've been some very embarassing privilege escalation bugs recently.