PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/logviewer/get_messages2.sh

http://github.com/hhughes/ocaml-frui
Shell | 20 lines | 16 code | 3 blank | 1 comment | 2 complexity | 5a7653945b834cb86e601035d8d4e037 MD5 | raw file
 1#!/bin/sh
 2
 3N=$1
 4COUNT=0
 5
 6if [ -z $N ]
 7then
 8    N=100
 9fi
10
11while [ $COUNT -lt $N ]
12do
13    M=`wget -qO- http://localhost:8080/next_msg | sed '1d' | sed '$d' | sed s/\"/\'/g`
14    if [ -n "$M" ]
15    then
16	echo "[$M]" >> "test2-$COUNT.json"
17	COUNT=`expr $COUNT + 1`
18    fi
19    sleep .25
20done