![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Shell
Quincy379
坚持、冷静
展开
-
Shell之自动化安装elasticsearch代码实现V2
代码】Shell之自动化安装elasticsearch代码实现V2。原创 2022-07-15 12:33:43 · 511 阅读 · 0 评论 -
Linux之自动化创建自定义Yum源
export TMOUT=0cat /etc/redhat-releasecat /etc/issueuname -amkdir /etc/yum.repos.d/bakmv /etc/yum.repos.d/* /etc/yum.repos.d/bakecho -e "[centos7.6]name=centos7.6baseurl=http://xx.xx.xx.xx:18080:/yum/centos7.6enabled=1gpgcheck=0" > /etc/yum.re原创 2020-12-08 10:02:26 · 230 阅读 · 0 评论 -
Shell之$0,$1,$2的含义
touch test.sh:#!/bin/shecho "shell脚本本身的名字: $0"echo "传给shell的第一个参数: $1"echo "传给shell的第二个参数: $2"运行时:./test.sh 1 2$0:代表文件名:test.sh$1:代表输入的第一个参数$2:代表输入的第二个参数...原创 2018-08-14 15:33:57 · 3715 阅读 · 0 评论 -
Shell之删除某个路径下N前天的文件夹(时间命名)
文件夹以时间命名,比如20190917。具体处理见下:#!/bin/sh#rm -rf /var/spool/postfix/maildrop/*location="/data/tingyun/shared/data/application/export/"dt=`date +%Y%m%d -d "10 days ago"`for subdir in $(ls $location)...原创 2019-09-17 14:53:05 · 2010 阅读 · 2 评论