a quick example, adapt and extend, don't use it just plain as I wrote it..
Code:
#!/bin/bash
if [ -z $1 ]; then
echo "Usage: $0 <target_user>"
exit 1
fi
echo "Enter your msg:"
echo -n "-> "
read msg
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:
Code:
cat /tmp/$USER-mesg && echo > /tmp/$USER-mesg
It needs alot more error-checking and stuff like tyhat but something to work from (: