摘要: shell脚本实现ssh自动登录远程服务器示例:#!/usr/bin/expectspawn ssh root@192.168.22.194expect "*password:"send "123\r"expect "*#"interact原文链接:http://www.xuanhao360.com... 阅读全文
posted @ 2015-02-24 17:18 懒惰的肥兔 阅读(132112) 评论(7) 推荐(21) 编辑
摘要: mysql --prompt修改命令行链接mysql时的提示符,shell脚本示例如下#!/bin/bashcase $1 in crm) cmd='mysql -h192.168.1.2 -uroot -proot -P3306 -Dcrm';;*) echo "数据库变量不存在:$... 阅读全文
posted @ 2015-02-24 17:13 懒惰的肥兔 阅读(2806) 评论(0) 推荐(0) 编辑