popup messages

Joel Hammer jhammer2 at home.com
Thu Nov 8 18:27:02 GMT 2001

Here. This actually works, if you are crazy enuf to use it.

smbstatus 2>/dev/null | cut -c40-60 | sed 's/ .*//' | grep -v machine | sort -u | sed '/----/d' | sed /^$/d  | while read i;do cat YourMessageFile | smbclient -M $i; done

It gets the machine names from smbstatus, removes the ipnumber after them,
remove the word machine, sorts uniquely,
removes the line of dashes, removes empty lines, and feeds it into the
smbclient command.
Now, to make it easier to use, save this as a script, say Message.
Change YourMessageFile to $1. Then, you can invoke the script with:
Message MyLatestMessageFile
and MyLatestMessageFile will get broadcast.
Ain't linux grand?

More information about the samba mailing list