Subversion Repositories wimsdev

Rev

Rev 2415 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2415 Rev 15609
Line 11... Line 11...
11
step=$w_step
11
step=$w_step
12
if [ "$start" -lt $site_start ]; then start=$site_start; fi
12
if [ "$start" -lt $site_start ]; then start=$site_start; fi
13
if [ -z "$end" ]; then end=$site_end; fi
13
if [ -z "$end" ]; then end=$site_end; fi
14
if [ "$end" -gt $site_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`
15
 f=`awk '$1>='$start' && $1<='$end' {print}' $actfile`
16
if [ ! -z "$step" ]; then
16
if [ ! -z "$step" ]; then
17
 echo "$f" | awk 'BEGIN {a=0;s=0;o=0};
17
 echo "$f" | awk 'BEGIN {a=0;s=0;o=0};
18
        a<'$step' {a++;s=s+$'$w_plot_type'};
18
        a<'$step' {a++;s=s+$'$w_plot_type'};
19
        a>='$step' {print $1" "s/a;o=s/a;a=0;s=0};
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
20
        END {if(a>0) print $1" "((s+o*('$step'-a))/'$step')}' | uniq
21
else
21
else
22
 echo "$f" | awk '$1>='$start' && $1 <='$end' {print $1" "$2}'
22
 echo "$f" | awk '$1>='$start' && $1 <='$end' {print $1" "$2}'
23
fi
23
fi
24
 
-