Fix awk FS with nulls

This commit is contained in:
Deon George 2022-10-17 22:57:20 +11:00
parent 99308f701b
commit 4000df716c

View File

@ -18,7 +18,7 @@ echo "* SBBS PID [${SBBS_PID}]"
if [ -n ${SBBS_PID} ]; then if [ -n ${SBBS_PID} ]; then
while [ -d /proc/${SBBS_PID} ]; do while [ -d /proc/${SBBS_PID} ]; do
NAME=$(cat /proc/${SBBS_PID}/cmdline |awk -F\00 '{print $1}') NAME=$(cat /proc/${SBBS_PID}/cmdline |awk 'BEGIN { FS = "\0" } ;{print $1}')
#echo "* SBBS NAME [${NAME}]" #echo "* SBBS NAME [${NAME}]"
if [ "${NAME}" != "sbbs" ]; then if [ "${NAME}" != "sbbs" ]; then