Replace /bin/bash with /bin/sh and BASH with SH in sed templates.