脚本实现linux和windows间的通知
2012-08-31 11:56
288 查看
依赖:
windows下:
plink: putty包里的一个程序, 用于ssh连接
linux下:
ssh, samba服务ok
linux下的shell脚本, notify-fifo:
#!/bin/sh
fifo_file=/tmp/sshfifo-${USER}
if [ ! -p $fifo_file ]; then
mkfifo $fifo_file
fi
if [ $# -eq 0 ]; then
echo "foo" > $fifo_file
else
read < $fifo_file
fi
windows下vbs脚本, wait-notify.vbs:
do
Set ws = CreateObject("Wscript.Shell")
ws.run "plink -C -l m00194513 -pw 0 10.141.84.159 notify-fifo bar", 0, true
dim ret
ret = msgbox("编译结束. 是否打开log?", 1)
if ret=1 then
Set ws = CreateObject("Wscript.Shell")
ws.run "npp
\\10.141.84.159\m00194513\src\1021100\build_android.log"
end if
loop
windows下:
plink: putty包里的一个程序, 用于ssh连接
linux下:
ssh, samba服务ok
linux下的shell脚本, notify-fifo:
#!/bin/sh
fifo_file=/tmp/sshfifo-${USER}
if [ ! -p $fifo_file ]; then
mkfifo $fifo_file
fi
if [ $# -eq 0 ]; then
echo "foo" > $fifo_file
else
read < $fifo_file
fi
windows下vbs脚本, wait-notify.vbs:
do
Set ws = CreateObject("Wscript.Shell")
ws.run "plink -C -l m00194513 -pw 0 10.141.84.159 notify-fifo bar", 0, true
dim ret
ret = msgbox("编译结束. 是否打开log?", 1)
if ret=1 then
Set ws = CreateObject("Wscript.Shell")
ws.run "npp
\\10.141.84.159\m00194513\src\1021100\build_android.log"
end if
loop
相关文章推荐
- windows db2备份至Linux备份服务器之脚本实现
- 用脚本实现windows与linux之间文件的传输
- 用脚本如何实现将Linux下的txt文件批量转化为Windows下的txt文件?
- 在LINUX上实现 windows 回收站功能的脚本
- 用脚本实现windows与linux之间文件的传输
- svn的备份与还原怎么用脚本实现svn备份(linux/windows)(转载)
- Linux学习-->如何通过Shell脚本实现发送邮件通知功能?
- Linux学习-->如何通过Shell脚本实现发送邮件通知功能?
- [转载]Samba 4实现windows匿名访问Linux共享!
- 用 Python 脚本实现对 Linux 服务器的监控
- 项目总结(四)----------Python实现Windows和Linux之间互相传输文件(文件夹)
- 线程同步(8):linux和Windows各种锁实现案例
- windows下编写的Shell脚本在Linux下运行错误的解决方法
- 实现虚拟机VMware上linux与windows互相复制与粘贴
- Windows or Linux环境下利用“共享内存”实现进程间通信的C/C++代码
- 移动硬盘实现Linux,Mac,Windows上的读写
- 实现linux作为server时与windows间的数据同步
- windows下bat脚本相当于linux的which
- 用Python脚本实现对Linux服务器的监控
- Linux下使用SVN Hook钩子脚本实现SVN提交前校验