🐥文本三剑客
文本处理三剑客之grep
#查看当前主机连接数最多的前三位
ss -nt|grep "^ESTAB"|tr -s ' ' :|cut -d: -f6|sort|uniq -c|sort -nr|head -n3
#排队掉空行和#开头的行
grep -v '^#' /etc/profile|
#匹配IP地址
ifconfig ens33|grep netmask|grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'|head -n1文本处理三剑客之Sed
文本处理三剑客之AWK
Last updated