码迷,mamicode.com
首页 >  
搜索关键字:expect 批量修改密码    ( 1299个结果
puppet
sshrsyncfuncpuppet最方便的还应该是cfengin或者puppet了另外就是ssh相关了。还有就是twitter的murder系统(基于BT,分发性能非常非常高)。expect来交互了phabricator 安装Subversion + ReviewBoard + Jenkins 切...
分类:其他好文   时间:2015-07-09 19:24:30    阅读次数:190
__builtin_expect — 分支预测优化
1.引言在很多源码如Linux内核、Glib等,我们都能看到likely()和unlikely()这两个宏,通常这两个宏定义是下面这样的形式。#define likely(x) __builtin_expect(!!(x), 1)#define unlikely(x) __built...
分类:其他好文   时间:2015-07-07 16:31:50    阅读次数:236
ansible 自动ssh
安装yum-yinstallansibleexpect生成key,ssh-keygen-trsa-f~/.ssh/id_rsa两种办法ssh+expect出自oldbodycat/etc/ansible/hosts[web]web1ansible_ssh_host=192.168.1.21web2ansible_ssh_host=192.168.1.22提供修改的exp.sh./etc/init.d/functions ip=$1 functionKNOWN_HOST_REBUI..
分类:其他好文   时间:2015-07-01 18:46:00    阅读次数:182
适配器模式
1.定义Convert the interface of a class into another interface clients expect.Adapter lets classes work together that couldn't otherwise becasue of incom...
分类:其他好文   时间:2015-07-01 15:43:48    阅读次数:211
UNIX/LINUX使用expect实现人机自动交互功能
expect用法 [#!/usr/bin/expect] 这一行告诉操作系统脚本里的代码使用那一个shell来执行。这里的expect其实和linux下的bash、windows下的cmd是一类东西。 注意:这一行需要在脚本的第一行。 [set timeout 30] 基本上认识英文的都知道这是设置超时时间的,现在你只要记住他的计时单位是:秒 。timeout -1 为永不超时 [spaw...
分类:系统相关   时间:2015-07-01 12:27:53    阅读次数:287
linux expect的简单用法及举例
一、expect简介我们通过Shell可以实现简单的控制流功能,如:循环、判断等。但是对于需要交互的场合则必须通过人工来干预,有时候我们可能会需要实现和交互程序如telnet服务器等进行交互的功能。而Expect就使用来实现这种功能的工具。Expect是一个免费的编程工具语言,用来实现..
分类:系统相关   时间:2015-06-29 00:47:42    阅读次数:332
通过在shell脚本中用scp或rsync实现远程同步文件
通过在shell脚本中用expect实现远程scp文件shell expect的简单用法http://myunix.blog.51cto.com/191254/1095074http://jie-hui-520.blog.163.com/blog/static/6007430120102261021...
分类:系统相关   时间:2015-06-27 21:16:41    阅读次数:163
Linux下expect批量更改交换机端口属性
一、for循环功能:将端口划入同一vlan。将10.240.210.29交换机上的1到36端口划入vlan210#!/usr/bin/expect-f #setHOST[lindex$argv0] #setPORT[lindex$argv0] #setvlan[lindex$argv1] setvlan210 for{setPORT1}{$PORT<=36}{incrPORT}{ spawntelnet10.240.210.29 sleep1 expe..
分类:系统相关   时间:2015-06-27 20:00:37    阅读次数:331
shell expect
ubuntusuroot****************************************************expect<<EOFspawnsurootexpect"密码:"send"$pass\r"expecteofEOF*******************************************************
分类:系统相关   时间:2015-06-26 15:08:05    阅读次数:130
免密码登录服务器python脚本
在自动化运维平台没有做完之前,常需要登录服务器做很多维护操作,每次找好长好长的密码,那么多服务器,你会疯掉的,所以瞎搞了以下脚本.先解一下燃眉之急,哈哈cat login_root.exp#!/usr/bin/expect -cset IP [lindex $argv 0]set PWD [lind...
分类:编程语言   时间:2015-06-25 00:04:42    阅读次数:174
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!