摘要: jms_num='ps -ef|grep Ris|grep -v grep|grep -v sh|wc -l' if [ $jms_num==1 ]run1.sh: line 7: [: too many arguments 变量加引号 “$jms_num” "$jms_num" -eq 1run1 阅读全文
posted @ 2021-07-28 14:09 小晓风 阅读(88) 评论(0) 推荐(0) 编辑
摘要: # 创建SSH对象 ssh = paramiko.SSHClient() # 允许连接不在know_hosts文件中的主机 ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) # 连接服务器 ssh.connect(hostname=h 阅读全文
posted @ 2021-07-28 13:48 小晓风 阅读(564) 评论(0) 推荐(0) 编辑
摘要: syntax error: unexpected end of file 之前也有遇到过,一般是在windows中编写的脚本,复制到linux环境,会出现这个报错,但是: :set ff 在vi编辑器中,查看文件的格式 :set fileformat=unix 在vi编辑器中将系统文件格式改为uni 阅读全文
posted @ 2021-07-28 13:34 小晓风 阅读(287) 评论(0) 推荐(0) 编辑