• Make Icon from Shell Command?

    From Gary Morrison@mr88cet@texas.net to comp.sys.mac.system,comp.sys.mac.apps on Tuesday, April 11, 2006 02:01:53
    From Newsgroup: comp.sys.mac.system

    Is there a way to make shell-script files (meaning Unix shells: sh,
    csh, ksh, etc.) executable by double-clicking that file's icon, by
    putting it in the dock or desktop, and so forth?

    --

    (Preferably reply to the newsgroup, please. If you reply by Email, I
    will sincerely try to receive your message, but it will probably get
    buried in spam.)
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Jeffrey Goldberg@nobody@goldmark.org to comp.sys.mac.system,comp.sys.mac.apps on Monday, April 10, 2006 22:27:19
    From Newsgroup: comp.sys.mac.system

    Gary Morrison wrote:
    Is there a way to make shell-script files (meaning Unix shells: sh,
    csh, ksh, etc.) executable by double-clicking that file's icon, by
    putting it in the dock or desktop, and so forth?

    Give them a .term extension. It will launch a Terminal window for them
    to run in when you double-click.

    -j


    --
    Jeffrey Goldberg http://www.goldmark.org/jeff/
    I rarely read top-posted, over-quoted or HTML posts
    My Reply-To address is valid.
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Gnarlodious@gnarlodious@yahoo.com to comp.sys.mac.system,comp.sys.mac.apps on Tuesday, April 11, 2006 05:35:21
    From Newsgroup: comp.sys.mac.system

    Entity Jeffrey Goldberg uttered this profundity:

    Gary Morrison wrote:
    Is there a way to make shell-script files (meaning Unix shells: sh,
    csh, ksh, etc.) executable by double-clicking that file's icon, by
    putting it in the dock or desktop, and so forth?

    Give them a .term extension. It will launch a Terminal window for them
    to run in when you double-click.

    .command does the same thing. You need to set the executable for the file before it will acquire the right icon.

    -- Gnarlie

    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Michael Vilain@vilain@spamcop.net to comp.sys.mac.system,comp.sys.mac.apps on Tuesday, April 11, 2006 00:48:23
    From Newsgroup: comp.sys.mac.system

    In article <C0609C37.17C13%gnarlodious@yahoo.com>,
    Gnarlodious <gnarlodious@yahoo.com> wrote:

    Entity Jeffrey Goldberg uttered this profundity:

    Gary Morrison wrote:
    Is there a way to make shell-script files (meaning Unix shells: sh,
    csh, ksh, etc.) executable by double-clicking that file's icon, by
    putting it in the dock or desktop, and so forth?

    Give them a .term extension. It will launch a Terminal window for them
    to run in when you double-click.

    .command does the same thing. You need to set the executable for the file before it will acquire the right icon.

    -- Gnarlie

    Which cannot be done from the Finder, IIRC. I know there are several utilities that allow this, like BareBones SuperGetInfo.

    --
    DeeDee, don't press that button! DeeDee! NO! Dee...



    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Bob Harris@nospam.News.Bob@remove.Smith-Harris.us to comp.sys.mac.system,comp.sys.mac.apps on Wednesday, April 12, 2006 00:25:41
    From Newsgroup: comp.sys.mac.system

    In article <l6E_f.15895$yy4.13958@tornado.texas.rr.com>,
    Gary Morrison <mr88cet@texas.net> wrote:

    Is there a way to make shell-script files (meaning Unix shells: sh,
    csh, ksh, etc.) executable by double-clicking that file's icon, by
    putting it in the dock or desktop, and so forth?

    as others have said, you can make the script executable (chmod +x
    script.name) and name the script with script_name.command

    The side effect of this is that it opens a terminal window (which
    can be great if your command has output you want to see.

    However, if you just want to double click a command to do some
    task, or even better be able to drag and drop some files on top of
    your script then create a little stub Applescript to run your
    shell script

    on open filelist
    repeat with i in filelist
    -- do shell script ¬
    -- "my_command " & quoted form of POSIX path of i
    do shell script "your.script.file.name.here" & ¬
    quoted form of POSIX path of i
    end repeat
    end open

    Bob Harris
    --- Synchronet 3.18b-Win32 NewsLink 1.113