Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Stupid question' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Stupid question
Authored by: kholburn on Mar 04, '08 12:43:34AM

Hmmm... that's odd. If you create a new file and paste the script into it? A .command file should open a window. That's what it does on my system. If you do "get info" you should see that it says open with

You can even use it to ask for keyboard input using a "read" command in bash.

[ Reply to This | # ]
I found the solution
Authored by: hamarkus on Mar 04, '08 09:47:15AM

As so often, it would have been best to trust one's first instincts. They were not to trust SubEthaEdit and use TextWrangler instead.

The problem was that copying the code out of Camino created text with CR as newline commands. When pasting this into SubEthaEdit, the program asks whether to keep the line endings or convert them. I naturally don't allow any apps to convert things without telling me exactly what it does. That means, I ended up with a file that had CR as newline commands but was happily showing LF at the bottom (which I naturally checked once things did not work and is my default for new files in SubEthaEdit).

Therefore, don't use SubEthaEdit because it allows you to do nonsense (mixed line endings in the same file) without any means to see which lines have which ending and without an obvious way to change the line endings (the only way to change line endings in file with mixed ones in SubEthaEdit is copy and paste all into a new file and ask it to convert the line endings).

[ Reply to This | # ]