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

Eric F Crist ecrist at secure-computing.net
Thu Jan 24 06:21:29 PST 2008


On Jan 23, 2008, at 5:22 PM, Richard Hartman wrote:

>
> On Jan 23, 2008, at 3:07 PM, Richard Hartman wrote:
>
>>
>> On Jan 23, 2008, at 3:06 PM, Jerry Krinock wrote:
>>
>>> 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?
>>>
>>
>> Can you zip it and attach the zip? (Maybe apple's zip doesn't  
>> preserve permissions?)
>>
>
> Of course, I'm sure the canonical way to do this is to tar it, then  
> zip the tiny tarball for attachment. That would surely preserve  
> everything necessary, but would require some "man" effort for us  
> novices :o)


The command would be:

# tar -czf <file>.tgz <file(s)>

This will tar everything in <file(s)>, either a directory or list of  
individual files, and then gzip the archive.

Replace <file> with the name you want to save your .tgz file as.

HTH
-----
Eric F Crist
Secure Computing Networks




More information about the X-Unix mailing list