converting from batch to bash

some converting done, now it won't work in either :)