shell bash bash-completion
shell 命令补全 yum install -y bash-completion
shell 命令补全 yum install -y bash-completion
/bin/true 固定返回0 /bin/false 固定返回1
#添加命令记录 echo "export PROMPT_COMMAND='{ m… 继续阅读 record history commands on shell
shell清理harbor镜像: #!/bin/bash #需要先安装jq命令,如 yum inst… 继续阅读 clean harbor via shell
获取昨天日期 date -d 'yesterday' date -d '… 继续阅读 shell date get yesterday
– name: Remove Docker system yum: name: – docker-c… 继续阅读 ansible install Docker
ls /root |awk '{print strftime("%c"… 继续阅读 awk为shell命令加上执行时间
#!/bin/bash ETCDCTL_PATH='/usr/local/bin/etcd… 继续阅读 shell backup etcd
#!/bin/bash # name col2 col3 score cat 123.txt |wh… 继续阅读 shell 逐行处理字符串
bash -n test.sh #读一遍脚本中的命令但不执行,用于检查脚本中的语法错误。 bash … 继续阅读 shell脚本调试
& 后台执行 不管结果 ;顺序执行 不管结果 && 执行成功再执行后续的命令
ping=`ping -c 10 -W 1 www.baidu.com` rtt=`echo &qu… 继续阅读 shell if [ “x{val}” == “x” ]
import ( "fmt" "github.com/fatih/co… 继续阅读 golang shell color
#支持的 Shell 种类 [root@node01 ~]# cat /etc/shells /bi… 继续阅读 Linux 使用 shell
new: useradd –home /dev/null –shell /sbin/nologi… 继续阅读 创建无ssh权限的用户
wget https://raw.githubusercontent.com/TyrantJoy/O… 继续阅读 MTProxy代理工具
export http_proxy=’http://172.16.0.2:8118′ export … 继续阅读 shell use http proxy
export http_proxy=’http://192.168.2.2:1080′ export… 继续阅读 shell使用http代理
#!/bin/sh dmin= if [ “$dmin” = “” ] then echo “… 继续阅读 shell判断变量是否为空
rewards=2.5 old_rewards=2.6 if [ `echo “$rewards =… 继续阅读 shell浮点数比较