Rev 23 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | #! /bin/sh |
2 | |||
3 | if [ -z "$w_stat_module" ]; then w_stat_module=00access.act; fi |
||
4 | |||
5 | actfile=$w_wims_home/log/account/$w_stat_module |
||
6 | site_start=19980101 |
||
7 | site_end=`date '+%Y%m%d'` |
||
8 | |||
9 | start=$w_date1 |
||
10 | end=$w_date2 |
||
11 | step=$w_step |
||
12 | if [ "$start" -lt $site_start ]; then start=$site_start; fi |
||
13 | if [ -z "$end" ]; then end=$site_end; fi |
||
14 | if [ "$end" -gt $site_end ]; then end=$site_end; fi |
||
15 | f=`awk '$1>='$start' && $1<='$end' {print}' $actfile` |
||
16 | if [ ! -z "$step" ]; then |
||
17 | echo "$f" | awk 'BEGIN {a=0;s=0;o=0}; |
||
18 | a<'$step' {a++;s=s+$'$w_plot_type'}; |
||
19 | a>='$step' {print $1" "s/a;o=s/a;a=0;s=0}; |
||
20 | END {if(a>0) print $1" "((s+o*('$step'-a))/'$step')}' | uniq |
||
21 | else |
||
22 | echo "$f" | awk '$1>='$start' && $1 <='$end' {print $1" "$2}' |
||
23 | fi |
||
24 |