通过if语句判定用户是否存在再创建用户

linux 集中简单的脚本linux 集中简单的脚本


二 

case语句的简单使用

linux 集中简单的脚本linux 集中简单的脚本

通过expect来自动输入回车键等输入要求

linux 集中简单的脚本


linux 集中简单的脚本


通过exp脚本来应答sh脚本


linux 集中简单的脚本

linux 集中简单的脚本



linux 集中简单的脚本


linux 集中简单的脚本


在shell脚本中执行自动应答

linux 集中简单的脚本



通过自动输入密码来自动连接其他主机获取信息

linux 集中简单的脚本


linux 集中简单的脚本





通过自动应答expect来获取局域网中所有打开的主机

需要注意的时在不同系统中  命令后自动执行的操作不同 需要使用sed来替换掉


sed  /\r//g


linux 集中简单的脚本



break的简单使用  跳过某一次循环但继续执行接下来的循环

linux 集中简单的脚本

linux 集中简单的脚本

简单倒计时脚本

linux 集中简单的脚本

linux 集中简单的脚本



通过expect来自动对其他主机创建用户

linux 集中简单的脚本


linux 集中简单的脚本

 图为有用户  其显示down

linux 集中简单的脚本



使用case来创建用户  对以存在的用户进行管理

linux 集中简单的脚本


linux 集中简单的脚本linux 集中简单的脚本



如图为对mysql数据库进行备份

linux 集中简单的脚本

linux 集中简单的脚本


脚本搭建论坛  


linux 集中简单的脚本linux 集中简单的脚本

相关文章: