Unix Commands

HP 9000/800 Server running HP-UX UNIX Server, users are connected via LAN and dialup connection.

Need help to write SHELL SCRIPT or UNIX Commands which would perform the following:

-ping IP address of all login/connected users to our server
-send customized text message to all the login users
-While sending message if any user found to be logout then skip and continue with the next IP address

Please HELP!!!

Use the ping command to ping an IP
Use the write command to send a message to a single user - and the wall command to send to all users. Note the mesg command - some users may not get the messages you send.

You may also have ovxecho or ovxbeep on your system (part of HP Openview). This would send a X style box to the user with the message.