码迷,mamicode.com
首页 >  
搜索关键字:sed awk    ( 13063个结果
12.shell脚本批量创建和删除用户
思路:先判断用户是否存在,如果存在用for命令进行批量创建。1.批量创建用户#!/bin/bashpass_num=`awk-F":"‘{print$1}‘/etc/passwd|grep"user_0[0-9]"|wc-l`#wc-l统计/etc/passwd用户数量if[$pass_num-eq0];then#判断是否为零,为0则创建foriin`seq-w009`#for循环创建0-9个用户
分类:系统相关   时间:2020-10-26 11:01:19    阅读次数:28
`curl -L` 解决 GitHub 的 raw.githubusercontent.com 无法连接问题
解决 GitHub 的 raw.githubusercontent.com 无法连接问题 在使用 curl 下载文件时,如果出现以下情况 curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection ref ...
分类:Web程序   时间:2020-10-24 09:48:51    阅读次数:57
Understanding about Baire Category Theorem
Definition (Nowhere dense set) A set $A$ in a topological space $X$ is nowhere dense if the complement of its closure is dense in $X$, i.e. $\overline ...
分类:其他好文   时间:2020-10-22 22:47:57    阅读次数:24
统计cpu脚本
获取COMMAND参数 top -n 1 -c| awk -F '[, %]+' 'NR==8 {print $13}' 获取cpu空闲占用 top -n 1 -c| awk -F '[, %]+' 'NR==3 {print $13}' 参考别人脚本 明天再搞 #!/bin/bash LANG=e ...
分类:其他好文   时间:2020-10-20 16:17:55    阅读次数:17
树莓派显示CPU温度
作用 显示CPU核心温度,并用小数形式返回。 适合脚本调用 效果 pi@rpi0w:~ $ cat /sys/class/thermal/thermal_zone0/temp|awk '{printf("Temp = %.2f\n",$1/1000)}' Temp = 27.17 ...
分类:其他好文   时间:2020-10-19 22:30:15    阅读次数:27
Nginx日志分析 awk 命令
通过Nginx日志,可以简单分析WEB网站的运行状态、数据报表、IP、UV(unique visitor指独立访客访问数,一台电脑终端为一个访客。)、PV(page view即页面访问量,每打开一次页面PV计数+1,刷新页面也是)访问量等需求,如下为常用需求分析: (1) 统计Nginx服务器独立I ...
分类:其他好文   时间:2020-10-18 16:18:58    阅读次数:21
批量关闭防火墙安全机制
#!/bin/bash #by wwp 2020-10-14 for ip in `cat ip.list` do { ping -c1 -W1 $ip &>/dev/null if [ $? -eq 0 ];then ssh $ip "sed -ri '/^#UseDNS/cUseDNS no' ...
分类:其他好文   时间:2020-10-18 09:49:45    阅读次数:23
Container Runtime - CRI-O
2020 IT邦幫忙鐵人賽 Kubernetes 原理分析系列文章 kubernetes 探討 Container & Open Container Initiative Container Runtime Interface Container Network Interface Containe ...
分类:其他好文   时间:2020-10-18 09:39:20    阅读次数:21
设置ProxmoxVE的LXC仓库为国内源
使用中科大的有ProxmoxVE的仓库SSH登录节点,查找相关配置文档,修改中科大的源地址,操作如下:grep-rn"download.proxmox.com"/usr/share/perl5/PVE/*sed-i.bak"s#http://download.proxmox.com/images#https://mirrors.ustc.edu.cn/proxmox/images#g"/usr/s
分类:其他好文   时间:2020-10-18 09:31:59    阅读次数:26
nginx 代理 web socket 报错“WebSocket is already in CLO
WebSocket is already in CLOSING or CLOSED state.
分类:Web程序   时间:2020-10-16 11:21:13    阅读次数:49
13063条   上一页 1 ... 24 25 26 27 28 ... 1307 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!