I'm sure this isn't the answer you want, but why don't you figure out how to do it, fix it, and post it? It's just a bash script (not to take away from Hood3dRob1n, who has some great stuff), and you REALLY should learn some basic bash scripting if you wanna succeed at all with this type of thing. And if youre not willing to even go that far...life's gonna suck.