chimni,
HPUX does things a little differently when it comes to grep.
You are going to want to change the grep to an egrep without the -e option
and it should work fine. As an alternative, you could leave it as grep
and change the -e to a -E option. See the local man page on grep to see
why this works.