Shell脚本
白小白的不归路
@希望世界和平@
展开
-
数据备份
#!/bin/bashecho "Input user name "read user echo "Input passwd for the user"read passwdecho "Input databases name :"read nameif [ -z $name ]then echo "give me a database name...原创 2017-03-10 18:37:46 · 289 阅读 · 0 评论 -
ssh连接脚本
#!/usr/bin/expectset timeout 10set username [lindex $argv0]set passwd [lindex $argv1]set hostname [lindex $argv2]spawn ssh $username@$hostnameexpect "*password:"send "passwd\r"inter...原创 2017-03-10 18:33:52 · 498 阅读 · 0 评论 -
用户创建脚本
#!/bin/bash#echo -n "Input a username of file :"read file1 if [ -e $file1 ]then MAXLINE1=`wc -l $file1 |cut -d " " -f 1` else echo "No have username of file:" exitfiecho -n "Input a passwd...原创 2017-03-10 18:32:26 · 481 阅读 · 0 评论