写了个net脚本,类似于2k下net send
可以发SMB消息.
把下面脚本保存为/usr/local/bin/net
chmod +x /usr/local/bin/net
#!/bin/bash
#/usr/local/bin/net
case "$1" in
send)
echo "$3"|smbclient -I "$2" -M `nmblookup -A "$2"|sed -e '1d'
-e '3,/*/d'|cut -f2|cut -d' ' -f1`
;;
*)
echo "Usage:net send <IPaddr.> <message>"
exit 1
esac
例子:
net send 192.168.0.1 "hello, workd!"