码迷,mamicode.com
首页 >  
搜索关键字:expect tcl/tk    ( 1323个结果
mongodb insert 错误 ERROR: MessagingPort::call() wrong id got:367 expect:366 解决过程
这个错误网上介绍比较少, 记录一下最近工作中遇到mongodb insert 时候报错, 现象:Thu Sep 24 09:19:15.011 ERROR: MessagingPort::call() wrong id got:367 expect:366 toSend op: 2004 respo...
分类:数据库   时间:2015-09-25 17:55:20    阅读次数:213
同步文件至多个机器脚本(免输密码)
转载请标明出处~#!/bin/bashSPATH=/tmp/index.js #测试路径/文件DPATH=/tmp/index.js_bak #目标路径/文件distribute_rsync () { ###分发函数expect -c " spawn rsync -aP $...
分类:其他好文   时间:2015-09-23 23:30:50    阅读次数:503
Linux使用expect脚本实现远程机器自动登录
Linux使用expect脚本实现远程机器自动登录...
分类:系统相关   时间:2015-09-23 10:35:56    阅读次数:187
内核中likely和unlikely宏定义
在内核代码中经常会看到unlikely和likely的踪影。他们实际上是定义在linux/compiler.h 中的两个宏。 #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(.....
分类:其他好文   时间:2015-09-22 18:44:27    阅读次数:151
python 实现 自动 svn checkout
pyhton利用pexpect模块实现svnchekout一,安装pexpectpipinstallpexpect二,python脚本实现#!/usr/bin/envpython #-*-coding:utf-8-*- importpexpect username=‘admin‘ password=‘passwd‘ svnurl=‘http://mysvnurl.com/svnproject‘ if__name__==‘__main__‘: svn_link=‘svn..
分类:编程语言   时间:2015-09-22 14:46:36    阅读次数:2915
设计模式:适配器模式
一:适配器模式的定义 适配器模式:将一个类的接口转换成客户希望的另一个接口。适配器模式让那些接口不兼容的类可以一起工作 Adapter Pattern:Convert the interface of a class into another interface clients expect.A.....
分类:其他好文   时间:2015-09-14 00:27:37    阅读次数:287
Python自动化运维之简易ssh自动登录
#!/usr/bin/envpython#-*-coding:utf-8-*-importpexpectimportsysssh=pexpect.spawn(‘sshroot@192.168.20.103‘)fout=file(‘sshlog.txt‘,‘w‘)ssh.logfile=foutssh.expect("root@192.168.20.103‘spassword:")ssh.sendline("yzg1314520")ssh.expect(‘#‘)ssh.sendline(‘ls/home‘)ss..
分类:编程语言   时间:2015-09-10 17:32:16    阅读次数:160
Linux expect 用法
expect是建立在tcl基础上的一个工具,它用来让一些需要交互的任务自动化地完成。因为expect是基于tcl的,所以需要你的系统中安装有tcl如何检查?[root@dev ~]# whereis tcltcl: /usr/lib/tcl8.4 /usr/share/tcl8.4如果看不到结果,请先安装tcl安装> 安装tcl解压tcl安装包后cd tcl8.4.11/unix/./config...
分类:系统相关   时间:2015-09-08 20:15:25    阅读次数:241
linux系统批量传输文件(SCP)
(1)首先,把要传输的主机ip保存到文件内viip10.161.4.x10.161.4.x10.161.4.x(2)编写脚本#!/usr/bin/kshusername=tomcat#这里是连接远程主机的用户名,本例中连接的远程主机用户名都一样#echo$usernamepassword=‘xxxxx‘#这里是密码#echo$passwordhomedir=">"ip_form=‘tomcat@..
分类:系统相关   时间:2015-09-07 14:27:30    阅读次数:249
expect实现ssh自动登录
expect实现ssh自动登录#!/usr/local/bin/expectset PASSWD [lindex $argv 1]set IP [lindex $argv 0]set CMD [lindex $argv 2]spawn ssh $IP $CMDexpect "(yes/no)...
分类:其他好文   时间:2015-09-04 14:05:01    阅读次数:151
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!