主要用到两个命令

-n  -z

 

if [ -n "$PID" ]; then

  echo "PID is not empty"

fi

 

if[ -z "$PID" ]; then

  echo "PID is empty"

fi

相关文章:

  • 2022-12-23
  • 2021-12-04
  • 2021-12-04
  • 2022-02-08
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
猜你喜欢
  • 2021-12-03
  • 2021-05-31
  • 2022-12-23
  • 2021-07-14
  • 2021-12-01
  • 2022-12-23
  • 2021-05-28
相关资源
相似解决方案