/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
- #!/bin/sh
- N=$1
- if [ -z $N ]
- then
- N=1000
- fi
- echo \[
- X=0
- while [ "$X" -lt "$N" ]
- do
- M=""
- while [ -z "$M" ]
- do
- M=`wget -qO- http://localhost:8080/next_msg | sed '1d' | sed '$d' | sed s/\"/\'/g`
- done
- echo "$M,"
- C=$(( `echo "$M"|wc -l` / 8 ))
- X=$(( $X + $C ))
- #echo $C
- #echo $X
- sleep .25
- done
- echo \]