awktable
PURPOSE
This processor is used to do some calculations in a tabular using awk.
CALLING SEQUENCE
{ { { #!awktable } } }
EXAMPLE
please remove the blanks between { { {
{ { {
#!awktable
||=1+2||a=1||
} } }RESULT:
3 |
a=1 |
{ { {
#!awktable
||A||B||result||
||1||1||=$1+$2||
||2||2||=$1+$2||
||3||2||=$1+$2||
} } }RESULT:
A |
B |
result |
1 |
1 |
2 |
2 |
2 |
4 |
3 |
2 |
5 |
{ { {
#!awktable
||A||B||C ||D ||
||1||1||=$1+$2||=$3/1.5||
||2||2||=$1+$2||=$3/2.5||
||3||2||=$1+$2||=$3/3.5||
} } }RESULT:
A |
B |
C |
D |
1 |
1 |
2 |
1.33333 |
2 |
2 |
4 |
1.6 |
3 |
2 |
5 |
1.42857 |
{ { {
#!awktable
||A||B||SUM||Endpreis||
||1||1||22||=$1+$2||=$1*$3||=$4*$5||
||1||2||3||4||5||6||
} } }RESULT:
A |
B |
SUM |
Endpreis |
||
1 |
1 |
22 |
2 |
22 |
44 |
1 |
2 |
3 |
4 |
5 |
6 |
PROCEDURE
This processor needs the external awk routine
RESTRICTIONS
- a formular has to start by a "=" as first sign
- formulars could only access variables in the same line
">" and "|" in formulars are ignored because they could be used to make some trouble on the server
