PageRenderTime 15ms CodeModel.GetById 10ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/logviewer/get_messages.sh

http://github.com/hhughes/ocaml-frui
Shell | 27 lines | 23 code | 3 blank | 1 comment | 3 complexity | 21540a4b8dcfff0625395c77627f5275 MD5 | raw file
 1#!/bin/sh
 2
 3N=$1
 4
 5if [ -z $N ]
 6then
 7    N=1000
 8fi
 9
10echo \[
11X=0
12while [ "$X" -lt "$N" ]
13do
14    M=""
15    while [ -z "$M" ]
16    do
17	M=`wget -qO- http://localhost:8080/next_msg | sed '1d' | sed '$d' | sed s/\"/\'/g`
18    done
19    echo "$M,"
20    C=$(( `echo "$M"|wc -l` / 8 ))
21    X=$(( $X + $C ))
22    #echo $C
23    #echo $X
24    sleep .25
25done
26
27echo \]