[colug-432] Script basic
Scott Merrill
skippy at skippy.net
Wed May 13 14:18:22 EDT 2015
> On May 13, 2015, at 2:12 PM, Steve VanSlyck <s.vanslyck at postpro.net> wrote:
>
> Umpf.
>
> Yes, I have seen it before, now you mention it. Seems my old windows machines always started with PATH=.;... Or at least I seem to remember it that way. Regardless, I always *assumed* the computer always looked in the current directory first.
>
> Anyway, as you saw in previous email i am now getting this
> [root at vslaw2 ~]# ./server_setup.sh
> -bash: ./server_setup.sh: /bin/bash^M: bad interpreter: No such file or directory
> error.
>
> No idea what the ^M means. I don't see anything when looking at the file in nano and confirmed it with VI/VIM just to be sure, with same result
>
You’re running into one of the frustrating differences between Windows and UNIX (and Mac!) systems.
http://www.cs.toronto.edu/~krueger/csc209h/tut/line-endings.html
https://en.wikipedia.org/wiki/Newline
If you’re editing files on Windows and then transferring them over to Linux, you’ll likely keep having this problem. There are several solutions.
You can use a text editor that understands different line endings. The default Windows Notepad application *does not* understand anything other than Windows line endings.
You can use a tool called `dos2unix` on your Linux systems to convert Windows line endings to UNIX line endings.
Cheers,
Scott
More information about the colug-432
mailing list