git.stg.codes
/
stg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
704c269
)
Parse admins list.
author
Maxim Mamontov
<faust.madf@gmail.com>
Fri, 10 Oct 2014 19:15:22 +0000
(22:15 +0300)
committer
Maxim Mamontov
<faust.madf@gmail.com>
Fri, 10 Oct 2014 19:15:22 +0000
(22:15 +0300)
functest/test.sh
patch
|
blob
|
history
diff --git
a/functest/test.sh
b/functest/test.sh
index 62a8a5810946c8ec271eba695b17bfb7b8fe167e..de55a588b7ec22e940f9de62025e474c6ab94a2f 100755
(executable)
--- a/
functest/test.sh
+++ b/
functest/test.sh
@@
-61,7
+61,27
@@
then
exit 0
fi
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
printf "Stopping...\n"
kill $PID