[X-Unix] Any way to email a doubleclickable shell script?

Jerry Krinock jerry at ieee.org
Wed Jan 23 15:06:36 PST 2008

I've created a shell script, actually a perl script, and given it  
a .command extension, so it executes on my Mac when I doubleclick it.

I'd like to email it to a non-Terminal-savvy user.  But when I attach  
the file to an email, send it, receive it, and save the attachment to  
the desktop, the email client (Microsoft Entourage) writes it with  
octal '644' permissions, so it won't execute.

Is there any way around this?

(I've tried for the last half hour to wrap it in "perl -e  
'MY_SCRIPT'", and then double-wrap it in an AppleScript, with "do  
shell script".  But backslash-escaping these wrappers is very  
difficult; still no success after 30 minutes of hacking.  I suppose  
this can be done, but it won't be very fun or very readable.)


Jerry Krinock

More information about the X-Unix mailing list