Tweaked the shell script - works now