Get screen pid
bash
Linux
#!/bin/bash
# script.sh test
psid=`screen -list | grep $1 | awk -F'.' '{print $1}' | awk '{print $1}'`
if [ $? != 0 ]; then
echo "error ps $1 no run"
exit 1
fi
error ps test no run