test.sh 186 B

123456789
  1. #!/bin/zsh
  2. # shellcheck disable=SC1065
  3. # shellcheck disable=SC1036
  4. PID=`(lsof -i:80| awk 'NR==2' | awk '{print $2}')`
  5. if [ ! -n "$PID" ]; then
  6. echo "IS NULL"
  7. else
  8. echo "NOT NULL"
  9. fi