On Sat, 28 Feb 2004 22:50:05 +0100, Dino wrote:
> hello,
> i've created some shell scripts (bash, OS X 10.3) to automatically retrieve
> backup-files from different webservers and copy them to my local HD. this
> works fine, but i have to start them from the terminal window by typing "sh
> [myscript]".
If you are typing "sh [myscript]" then you are running the script in
Bourne shell (sh), rather than bash. It probably doesn't matter, unless
you want to use some specific features of bash in your script.
> is there a way to launch them directly from the desktop or dock by double
> click?
Give your script a suffix of ".command". Then make it executable by
typing
chmod +x [myscript].command
Now you can double-click to run the script, but it will still open a
Terminal window for you, which you can close when it is finished.
If you really want your script to run in bash, add the line
#!/bin/bash
at the beginning of the script.
--
Dave Seaman
Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling.
<http://www.commoncouragepress.com/index.cfm?action=book&bookid=228><!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: launching shell scripts (bash) from OS X 10.3 from the des..