a quick example, adapt and extend, don't use it just plain as I wrote it..
if [ -z $1 ]; then
echo "Usage: $0 <target_user>"
echo "Enter your msg:"
echo -n "-> "
echo "$USER wrote you on $(date): $msg >> /tmp/$1-mesg
echo "=======================" >> /tmp/$1-mesg
# has to have write permissions via some way, not that safe d:
And /etc/profile could have something like this:
cat /tmp/$USER-mesg && echo > /tmp/$USER-mesg
It needs alot more error-checking and stuff like tyhat but something to work from (: