|
|
|
Stupid question
I've created a file with the content presented above. Saved it as crosswords.sh on my Desktop and made it executable. Navigated in the Terminal to my Desktop, nothing happens. How am I supposed to use this?
./crosswords.sh (nothing happens, no error message) crosswords.sh or crosswords (unknown command) ./crosswords.sh 'a..a' (nothing happens)
Stupid question
try using the extension "command" as in "crosswords.command".
Stupid question
Thanks, but this does not change the behaviour a bit.
./crosswords.command still results in nothing.
Stupid question
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.
I found the solution
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).
Stupid question
Or there's an application called Platypus that creates a .app out of a script. It 's here.
Stupid question
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.)
Stupid question
If you want input you probably need to go to applescript. Open a dialog and then use applescript to run the shell script.
|
SearchFrom our Sponsor...What's New:HintsNo new hintsComments last 2 days
Links last 2 weeksNo recent new linksWhat's New in the Forums?
The Editor's Corner...Here are some of my (robg) other projects...
Hints by TopicNews from Macworld
The macosxhints PollWhat version of OS X are you running as your main OS?
Other polls | 11,378 votes | 42 comments
|
|
Copyright © 2009 Mac Publishing LLC (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Powered by Geeklog Created this page in 0.04 seconds |
|