mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
30 lines
837 B
Bash
30 lines
837 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
while [ $# -ge 1 ]; do
|
||
|
LOG=$1
|
||
|
while read LINE; do
|
||
|
case "$LINE" in
|
||
|
*got_connect_cmd:\ connName* )
|
||
|
CONNNAME="$(echo $LINE | sed 's,^.*connName: "\(.*\)"$,\1,')"
|
||
|
;;
|
||
|
*hostid* )
|
||
|
HOSTID=$(echo $LINE | sed 's,^.*set hostid: \(.\)$,\1,')
|
||
|
;;
|
||
|
*getChannelSeed:\ channelSeed:*)
|
||
|
SEED=$(echo $LINE | sed 's,^.*getChannelSeed: channelSeed: \(.*\)$,\1,')
|
||
|
;;
|
||
|
esac
|
||
|
done < $LOG
|
||
|
if [ -z "${CONNNAME}" ]; then
|
||
|
echo "CONNNAME not found in $LOG" >&2
|
||
|
elif [ -z "${HOSTID}" ]; then
|
||
|
echo "HOSTID not found in $LOG" >&2
|
||
|
elif [ -z "${SEED}" ]; then
|
||
|
echo "SEED not found in $LOG" >&2
|
||
|
else
|
||
|
echo ${CONNNAME}/${HOSTID}/${SEED}
|
||
|
fi
|
||
|
|
||
|
shift
|
||
|
done
|