Skip to content

Commit

Permalink
Script to group log by client.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyfdecyf committed Jul 28, 2013
1 parent 76dbf0e commit 011b606
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions script/log-group-by-client.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

if [[ $# != 1 ]]; then
echo "Usage: $0 <log file>"
exit 1
fi

log=$1

#clients=`egrep 'cli\([^)]+\) connected, total' $log | cut -d ' ' -f 4`

#for c in $clients; do
#echo $c
#done

sort --stable --key 4,4 --key 3,3 $log | sed -e "/closed, total/s,\$,\n\n," > $log-grouped

0 comments on commit 011b606

Please sign in to comment.