Thanks.
Actually that was a typo... Now I made the changes, now the script is running. But it keeps on running and I have to kill it. After killing once it shows the following messgae:
# ./new.ksh
(Interrupt -- one more to kill letter)
When I kill again, then I get the hash prompt back.
To tell mailx that we have finished typing the mail body we send it just a line feed. This should stop your script hanging if all you want to do is send an email with the subject line "Up" and no mail body.