functions.inc
资源名称:gateway-1.2.1 [点击查看]
上传用户:gzpyjq
上传日期:2013-01-31
资源大小:1852k
文件大小:1k
源码类别:
手机WAP编程
开发平台:
WINDOWS
- function check_for_errors {
- if grep 'WARNING:|ERROR:|PANIC:' "$@" >/dev/null
- then
- echo "$0 failed" 1>&2
- echo "See bench_sms*.log for info" 1>&2
- exit 1
- fi
- }
- function plot_commands {
- echo "set terminal $1"
- echo "set xlabel "$2""
- echo "set ylabel "$3""
- if [ "$5" = "" ]
- then
- echo -n "plot "$4" notitle with lines"
- else
- echo -n "plot "$4" title "$5" with lines"
- fi
- shift 5
- while [ "$2" != "" ]
- do
- if [ "$2" == "" ]
- then
- echo -n ", "$1" notitle with lines"
- else
- echo -n ", "$1" title "$2" with lines"
- fi
- shift 2
- done
- echo ""
- }
- function plot {
- base="$1"
- shift
- plot_commands png "$@" | gnuplot > "$base.png"
- plot_commands "postscript eps" "$@" | gnuplot > "$base.ps"
- }