#! /bin/bash
#First argument ($1) would be the name of the file to be unzipped
#Second argument ($2) would be where to unzip the files to (absolute path)
unzip $1 -d $2
find $2 -name *.sh -print0 | xargs -0 chmod +x

This would work as long as the files you were wanting to make as executable were always going to be *.sh. Otherwise could always add a third argument ($3) and substitute it for the *.sh but then you would always have to input the name of the file to be made executable for every archive.

What shell are you using? I know in bash you can define your own commands (via alias), for example once i made a custom command i called cdsee and it took a single parameter (a directory) and cd'd to it, then ls -lah immediately. made it very easy to do my work, as i immediately saw the contents of said folder.

It should, likewise, be possible, and even easy, to make a command that would run the unzip command, and then immediately chmod +x.

Unfortunately, how to pull arguments is escaping me at the moment. But the simplest answer would be to use a linux machine for the originating zip-job, or making your custom command/alias execute the chmod automatically.

Having an alias with its own semantic arguments is kind of a kludge. It would very nearly be better to write a small script and place it in /usr/bin or something.
–
Falcon MomotMay 3 '12 at 19:51

1

it works, and is simple to implement. what's the problem with that? also, i don't entirely know what you're talking about with a small script in usr/bin. an alias is just the solution i know of that would work.
–
acolyteMay 3 '12 at 20:07