常用shell脚本: 常用shell脚本

加载分类中...

    需求:一键安装程序,需要用到expect自动交互。 #!/bin/bash basedir=`cd $(dirname $0); pwd -P` cd $basedir function YumDokcer(){ yum install -y yum-utils device-mapper-persistent-data lvm2 yu...

    shell
    文艺范儿     2020-03-29 21:02     來源: 常用shell脚本     0 936 0

    需求:开发要求每5秒在最新的日志里面匹配相应的日志内容,匹配到之后就重启程序。注:程序重启之后会产生新的日志。 #!/bin/bash logfile=/var/log/bcc_dcoker_err.log #filename=`ls -t |head -n1|awk '{print $0}'` sleep=5 function ReD...

    shell
    文艺范儿     2020-03-29 21:01     來源: 常用shell脚本     0 907 0
    文艺知识分享平台 -V 4.9.5 -wcp
    京公网安备100012199188号 京ICP备2021030911号