跳转到内容

SRE笔记

  • 密码
    • 短链
  • 服务器
  • 关于

shell标签存档订阅

shell bash bash-completion

shell 命令补全 yum install -y bash-completion

  • 发表于: 2022-08-25 2022-08-25
  • 作者: shxiefc
  • 分类: SRE
  • 标签: bash, shell, yum
  • 发表评论: shell bash bash-completion

shell /bin/true /bin/false

/bin/true 固定返回0 /bin/false 固定返回1

  • 发表于: 2022-08-25 2022-08-25
  • 作者: shxiefc
  • 分类: SRE
  • 标签: shell
  • 发表评论: shell /bin/true /bin/false

record history commands on shell

#添加命令记录 echo "export PROMPT_COMMAND='{ m… 继续阅读 record history commands on shell

  • 发表于: 2022-08-22 2022-08-22
  • 作者: shxiefc
  • 分类: SRE
  • 标签: bash, https, sed, shell
  • 发表评论: record history commands on shell

clean harbor via shell

shell清理harbor镜像: #!/bin/bash #需要先安装jq命令,如 yum inst… 继续阅读 clean harbor via shell

  • 发表于: 2022-08-21 2022-08-21
  • 作者: shxiefc
  • 分类: SRE
  • 标签: awk, curl, grep, harbor, https, json, shell, tag
  • 发表评论: clean harbor via shell

shell date get yesterday

获取昨天日期 date -d 'yesterday' date -d &#039… 继续阅读 shell date get yesterday

  • 发表于: 2022-08-17 2022-08-17
  • 作者: aiops
  • 分类: SRE
  • 标签: bash, https, shell
  • 发表评论: shell date get yesterday

ansible install Docker

– name: Remove Docker system yum: name: – docker-c… 继续阅读 ansible install Docker

  • 发表于: 2022-08-14 2022-08-14
  • 作者: aiops
  • 分类: SRE
  • 标签: ansible, Docker, shell, yum
  • 发表评论: ansible install Docker

awk为shell命令加上执行时间

ls /root |awk '{print strftime("%c"… 继续阅读 awk为shell命令加上执行时间

  • 发表于: 2022-07-26 2022-07-26
  • 作者: erer, er
  • 分类: SRE
  • 标签: awk, bash, shell
  • 发表评论: awk为shell命令加上执行时间

shell backup etcd

#!/bin/bash ETCDCTL_PATH='/usr/local/bin/etcd… 继续阅读 shell backup etcd

  • 发表于: 2022-07-25 2022-07-25
  • 作者: erer, er
  • 分类: SRE
  • 标签: etcd, shell, ssl
  • 发表评论: shell backup etcd

shell 逐行处理字符串

#!/bin/bash # name col2 col3 score cat 123.txt |wh… 继续阅读 shell 逐行处理字符串

  • 发表于: 2022-07-25 2022-07-25
  • 作者: erer, er
  • 分类: SRE
  • 标签: bash, shell
  • 发表评论: shell 逐行处理字符串

shell脚本调试

bash -n test.sh #读一遍脚本中的命令但不执行,用于检查脚本中的语法错误。 bash … 继续阅读 shell脚本调试

  • 发表于: 2022-07-18 2022-07-18
  • 作者: erer, er
  • 分类: SRE
  • 标签: bash, shell
  • 发表评论: shell脚本调试

shell命令运行符号 & ; && 三者区别

& 后台执行 不管结果 ;顺序执行 不管结果 && 执行成功再执行后续的命令

  • 发表于: 2022-07-17 2022-07-17
  • 作者: erer, er
  • 分类: SRE
  • 标签: bash, shell
  • 发表评论: shell命令运行符号 & ; && 三者区别

shell if [ “x{val}” == “x” ]

ping=`ping -c 10 -W 1 www.baidu.com` rtt=`echo &qu… 继续阅读 shell if [ “x{val}” == “x” ]

  • 发表于: 2022-07-12 2022-07-12
  • 作者: erer, er
  • 分类: SRE
  • 标签: bash, grep, shell
  • 发表评论: shell if [ “x{val}” == “x” ]

golang shell color

import ( "fmt" "github.com/fatih/co… 继续阅读 golang shell color

  • 发表于: 2022-06-20 2022-06-23
  • 作者: bfyt
  • 分类: SRE
  • 标签: go, golang, shell
  • 发表评论: golang shell color

Linux 使用 shell

#支持的 Shell 种类 [root@node01 ~]# cat /etc/shells /bi… 继续阅读 Linux 使用 shell

  • 发表于: 2022-03-04 2022-03-04
  • 作者: stnds
  • 分类: SRE
  • 标签: bash, https, shell
  • 发表评论: Linux 使用 shell

创建无ssh权限的用户

new: useradd –home /dev/null –shell /sbin/nologi… 继续阅读 创建无ssh权限的用户

  • 发表于: 2022-02-27 2022-02-27
  • 作者: stnds
  • 分类: SRE, 开发
  • 标签: bash, https, shell, ssh
  • 发表评论: 创建无ssh权限的用户

MTProxy代理工具

wget https://raw.githubusercontent.com/TyrantJoy/O… 继续阅读 MTProxy代理工具

  • 发表于: 2022-02-20 2022-02-20
  • 作者: stnds
  • 分类: SRE
  • 标签: bash, https, shell
  • 发表评论: MTProxy代理工具

shell use http proxy

export http_proxy=’http://172.16.0.2:8118′ export … 继续阅读 shell use http proxy

  • 发表于: 2021-12-20 2021-12-20
  • 作者: tesla
  • 分类: SRE
  • 标签: bash, curl, ftp, http, https, proxy, shell
  • 发表评论: shell use http proxy

shell使用http代理

export http_proxy=’http://192.168.2.2:1080′ export… 继续阅读 shell使用http代理

  • 发表于: 2021-09-29 2021-09-29
  • 作者: dn
  • 分类: SRE
  • 标签: bash, ftp, http, https, proxy, shell
  • 发表评论: shell使用http代理

shell判断变量是否为空

#!/bin/sh  dmin= if [ “$dmin” = “” ] then   echo “… 继续阅读 shell判断变量是否为空

  • 发表于: 2021-09-24 2021-09-24
  • 作者: dn
  • 分类: SRE
  • 标签: bash, https, shell
  • 发表评论: shell判断变量是否为空

shell浮点数比较

rewards=2.5 old_rewards=2.6 if [ `echo “$rewards =… 继续阅读 shell浮点数比较

  • 发表于: 2021-09-24 2021-09-24
  • 作者: dn
  • 分类: SRE
  • 标签: bash, https, shell
  • 发表评论: shell浮点数比较

分页

页码: 1 页码: 2 页码: 3 页码: 4 页码: 5 下一页

搜索

搜索:

近期评论

  • test发表在《gin不转义html标签》
  • 路过发表在《msg=”getting status of runtime: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService”》
  • 禁止chrome浏览器http自动转成https – SRE笔记发表在《nginx安全配置 XSS攻击 Header头设置》
  • springboot lifecycle timeout-per-shutdown-phase优雅退出 – SRE笔记发表在《terminationGracePeriodSeconds优雅终止pod时间》
  • kubernetes Deployment快速部署rocketmq 4.9.2 dledger集群 3-broker – SRE笔记发表在《kubernetes Deployment快速部署rocketmq 4.9.2 dledger集群 1-镜像》

标签

aws (15) azure (12) Blockchain (28) centos (28) Docker (105) elasticsearch (26) eth (34) fil (39) go (129) golang (120) Grafana (13) hpc (15) http (299) ingress (14) java (75) jenkins (13) JVM (20) kubernetes (309) Linux (439) lotus (30) mongoDB (41) MySQL (184) nginx (112) Oracle (13) php (25) python (148) redis (34) s3 (75) shell (20) springboot (32) tomcat (15) ubuntu (31) vue (18) windows (42) wordpress (14) zabbix (37) zookeeper (13) 夏小胖 (31) 安全 (55) 工具 (451) 折腾 (24) 推荐 (15) 硬件 (61) 网络 (246) 资源 (49)

归档

  • 2022年11月
  • 2022年10月
  • 2022年9月
  • 2022年8月
  • 2022年7月
  • 2022年6月
  • 2022年5月
  • 2022年4月
  • 2022年3月
  • 2022年2月
  • 2022年1月
  • 2021年12月
  • 2021年11月
  • 2021年10月
  • 2021年9月
  • 2021年8月
  • 2021年7月
  • 2021年6月
  • 2021年5月
  • 2021年4月
  • 2021年3月
  • 2021年2月
  • 2021年1月
  • 2020年12月
  • 2020年11月
  • 2020年10月
  • 2020年9月
  • 2020年8月
  • 2020年7月
  • 2020年6月
  • 2020年5月
  • 2020年4月
  • 2020年3月
  • 2020年2月
  • 2020年1月
  • 2019年12月
  • 2019年11月
  • 2019年10月
  • 2019年9月
  • 2019年8月
  • 2019年7月
  • 2019年6月
  • 2019年5月
  • 2019年4月
  • 2019年3月
  • 2019年2月
  • 2019年1月
  • 2018年12月
  • 2018年11月
  • 2018年10月
  • 2018年9月
  • 2018年8月
  • 2018年7月
  • 2018年6月
  • 2018年5月
  • 2018年4月
  • 2018年3月
  • 2018年2月
  • 2018年1月
  • 2017年12月
  • 2017年11月
  • 2017年10月
  • 2017年8月
  • 2017年7月
  • 2017年6月
  • 2017年5月
  • 2017年4月
  • 2017年3月
  • 2017年2月
  • 2017年1月
  • 2016年12月
  • 2016年11月
  • 2016年10月
  • 2016年9月
  • 2016年8月
  • 2016年7月
  • 2016年6月
  • 2016年5月
  • 2016年4月
  • 2016年3月
  • 2016年2月
  • 2016年1月
  • 2015年12月
  • 2015年10月
  • 2015年9月
  • 2015年8月
  • 2015年7月
  • 2015年6月
  • 2015年5月
  • 2015年4月
  • 2015年3月
  • 2015年2月
  • 2015年1月
  • 2014年12月
  • 2014年11月
  • 2014年10月
  • 2014年9月
  • 2014年8月
  • 2014年7月
  • 2014年6月
  • 2014年5月
  • 2014年2月