Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!


Click here to return to the 'Stupid question' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Stupid question
Authored by: kholburn on Mon, Mar 3 2008 at 12:45PM PST
try using the extension "command" as in "crosswords.command".

[ Reply to This | # ]
Stupid question
Authored by: hamarkus on Mon, Mar 3 2008 at 12:50PM PST
Thanks, but this does not change the behaviour a bit.
./crosswords.command still results in nothing.

[ Reply to This | # ]
Stupid question
Authored by: kholburn on Tue, Mar 4 2008 at 12:43AM PST
Hmmm... that's odd. If you create a new file and paste the script into it? A .command file should open a Terminal.app window. That's what it does on my system. If you do "get info" you should see that it says open with Terminal.app

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 Tue, Mar 4 2008 at 9:47AM PST
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 | # ]
Stupid question
Authored by: kholburn on Mon, Mar 3 2008 at 12:51PM PST
Or there's an application called Platypus that creates a .app out of a script. It 's here.

[ Reply to This | # ]
Stupid question
Authored by: hamarkus on Mon, Mar 3 2008 at 1:40PM PST
I've used Platypus successfully with Perl scripts. The problem is that Platypus won't provide me with an input method to supply my search query. Its only way of providing input to a script turned application is files dropped on the resulting application.
(Incidentally, Platypus complained about /bin/bash not being a valid interpreter, after adding a space after the '#!' it did no longer complain.)

[ Reply to This | # ]
Stupid question
Authored by: kholburn on Tue, Mar 4 2008 at 12:36AM PST
If you want input you probably need to go to applescript. Open a dialog and then use applescript to run the shell script.

[ Reply to This | # ]