mirror of
https://github.com/zhigang1992/cow.git
synced 2026-01-12 22:46:29 +08:00
18 lines
299 B
Bash
Executable File
18 lines
299 B
Bash
Executable File
#!/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
|
|
|