shell脚本中获取进程pid

  • Post author:
  • Post category:其他




shell脚本中获取进程pid


ps aux | grep "orion"| grep -v "grep" | awk '{print $2}'


  • grep xxx

    只查看xxx内容

  • grep -v xxx

    不查看xxx内容

  • awk '{print $2}'

    打印第二列,只能使用单引号


参考文章:


https://blog.csdn.net/weixin_34245169/article/details/93964363



版权声明:本文为ben_na_原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。