#!/bin/sh

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

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

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

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

exit 0
