install_zj.sh脚本优化
来源:互联网 发布:北京尚学堂 java ppt 编辑:程序博客网 时间:2024/05/29 13:04
#!/bin/bash# Author: zhangji0910# Function: pexpect comm pscp、pssh# example: sh install_zj.sh # Others: pscp、psshscript_dir=$(cd $(dirname $0);pwd)print_time=$(date '+%F %T')tar zxf pexpect-*.tar.gz -C /tmpfile_1=$( [ -e /usr/bin/pscp ]&& echo $? )file_2=$( [ -e /usr/bin/pssh ]&& echo $? )file_3=$( [ -e /usr/bin/scp_echo ]&& echo $? )file_4=$( [ -e /usr/bin/INSTALL ] && echo $? )file_5=$( [ -e /usr/bin/pexpect.py ]&& echo $? )file_6=$( [ -e /usr/bin/pexpect.pyc ]&& echo $? )if [[ $file_1 == 0 && $file_2 == 0 && $file_3 == 0 && $file_4 == 0 && $file_5 == 0 && $file_6 == 0 ]]; then echo -e "$print_time [$?]:\033[0;32m pscp and pssh Already installed !!!\033[0m" echo -e "You confirm the installation \033[0;35m [(y|n)|(Y|N)]?: \033[1;32m" (export TMOUT=5; read input echo -e "\033[0m" if [ "$input" = "y" ] || [ "$input" = "Y" ]; then cp -v /tmp/pexpect-1109/* /usr/bin echo -e "" [ $? -eq 0 ] && echo -e "$print_time [$?]:\033[0;33m pscp and pssh Replace the successful\033[0m" echo -e "" rm -r /tmp/* exit 0 else echo -e "\033[0;33m STOP!" echo -e "" exit 1 fi )else echo -e "$print_time\033[0;36m [$?]: Ready to Install...\033[0m" echo -e "" cp -v /tmp/pexpect-*/* /usr/bin echo -e "" echo -e "$print_time [$?]:\033[0;32m pscp and pssh install Success \033[0m" rm -r /tmp/pexpect-* exit 1fi
0 0
- install_zj.sh脚本优化
- 有关sh脚本,优化svn管理android事务
- 第一个sh脚本
- sh脚本使用整理
- sh 脚本格式
- orainstroot.sh 脚本
- sh脚本编码问题
- runcluvfy.sh 脚本使用
- sh脚本 语法
- 创建.sh脚本
- .sh脚本的相关内容
- linux crond 脚本.sh
- sh脚本语法
- .sh脚本语法
- SH脚本入门总结
- SH脚本实例
- sh脚本:批量ping
- 树莓派sh脚本运行
- 第四章思维导图
- 鸡兔同笼
- [转]MySQL存储过程调试工具-dbForge Studio for MySQL
- understanding Steering Behaviors
- oracle自带性能分析工具
- install_zj.sh脚本优化
- Swift实用技术系列-XCode6本地化图解
- Android Asynchronous Http Client异步网络请求使用
- java本地方法通过jni连接至c函数
- svn Eclipse插件实现,不能显示svn属性。 以及eclipse-luna_svn插件安装
- 数论
- 手机root也安全
- matlab7.0安装步骤(window7)
- OK210 uboot 配置 笔记