awk , 很赞的教程:http://coolshell.cn/articles/9070.html

xargs, http://blog.csdn.net/andy572633/article/details/7214534

 

简单说, awk就是一个脚本编译器,用于处理输入输出。

xargs输出重定向命令。

 

awk应用:按连接数查看客户端IP
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr

  xargs应用:按照执行文件查找并结束进程

ps aufx | grep $server | grep -v grep | awk '{print $2}' | xargs kill -9

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-31
  • 2021-10-17
  • 2022-02-24
  • 2021-11-04
  • 2021-12-08
猜你喜欢
  • 2021-05-22
  • 2021-12-05
  • 2022-12-23
  • 2021-08-31
  • 2021-12-04
  • 2022-01-07
  • 2022-12-23
相关资源
相似解决方案