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 03, '08 12:45:12PM

try using the extension "command" as in "crosswords.command".



[ Reply to This | # ]
Stupid question
Authored by: hamarkus on Mar 03, '08 12:50:30PM

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 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 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 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 | # ]
Stupid question
Authored by: kholburn on Mar 03, '08 12:51:58PM
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 Mar 03, '08 01:40:18PM

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 Mar 04, '08 12:36:42AM

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 | # ]