conditionalise shell usage so works on mac and linux