从Linux上给windows发送popup消息

写了个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 "
exit 1
esac

例子:
net send 192.168.0.1 "hello, workd!"

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus