reset_wrong.sh

来自「《linux应用开发技术详解》的配套代码」· Shell 代码 · 共 15 行

SH
15
字号
#!/bin/bash 
#defind passwd ip file env 
read –p 'input password : ' –s passwd 
read –p 'input serverip files :' –s ip
#you  may change the local  differient it file 
#example ipbj
for host in 'more ./$ip'
do 
  expect –c '
  spawn /usr/bin/ssh $host shutdown –r now:
  expect \'password*\'
  send \'$passwd\r\';
  expent eof;'
done 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?