#!/bin/sh

if test $# != 1; then
	echo "Usage: $0 file"
	exit
fi

if test ! -x /bin/bsh; then
	echo '/bin/bsh not fount. Exiting.'
	exit
fi

ed $1 >/dev/null 2>&1 <<'eof'
1s/\/bin\/sh$/\/bin\/bsh/
w
q
eof

ed $1 >/dev/null 2>&1 <<'eof'
1s/\/bin\/sh\([^5]\)/\/bin\/bsh\1/
w
q
eof

exit 0
