X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/704c26980e576b01caf27af751ca5ca08f8f355a..4ede6cbe23f97d5fe3b196bd0313f011d9004070:/functest/test.sh diff --git a/functest/test.sh b/functest/test.sh index 62a8a581..de55a588 100755 --- a/functest/test.sh +++ b/functest/test.sh @@ -61,7 +61,27 @@ then exit 0 fi -printf "Got admins list:\n$RES\n" +printf "Got admins list:\n" + +LOGINS="" +OLDIFS=$IFS +IFS=$(printf "\n") +for LINE in $RES +do + printf -- "$LINE\n" + LOGIN=`echo $LINE | grep login` + if [ "$?" == "0" ] + then + LOGINS="$LOGINS\n"`echo $LOGIN | cut -d: -f2 | sed -e 's/^ *//' -e 's/ *$//'` + fi +done +IFS=$OLDIFS + +printf "Logins:\n$LOGINS\n" + +NUM=`echo $LOGINS | wc -l` + +printf -- "--------\n$NUM\n\n" printf "Stopping...\n" kill $PID