From a374fe502e1d3f3b28f795247454ff7e230cc903 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 17 Nov 2006 07:45:05 +0000 Subject: [PATCH] *** empty log message *** --- ase/test/awk/emp-025.awk | 7 +++++++ ase/test/awk/emp-026.awk | 12 ++++++++++++ ase/test/awk/emp-027.awk | 8 ++++++++ ase/test/awk/emp-en.data | 6 ++++++ ase/test/awk/emp-ko.data | 6 ++++++ ase/test/awk/emp.data | 2 +- ase/test/awk/ite-001.awk | 7 +++++++ ase/test/awk/ite-002.awk | 4 ++++ 8 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 ase/test/awk/emp-025.awk create mode 100644 ase/test/awk/emp-026.awk create mode 100644 ase/test/awk/emp-027.awk create mode 100644 ase/test/awk/emp-en.data create mode 100644 ase/test/awk/emp-ko.data create mode 100644 ase/test/awk/ite-001.awk create mode 100644 ase/test/awk/ite-002.awk diff --git a/ase/test/awk/emp-025.awk b/ase/test/awk/emp-025.awk new file mode 100644 index 00000000..72922285 --- /dev/null +++ b/ase/test/awk/emp-025.awk @@ -0,0 +1,7 @@ +$2 > 6 { n = n + 1; pay = pay + $2 * $3; } +END { if (n > 0) + print n, "employees, total pay is", pay, + "average pay is", pay/n; + else + print "no employees are paid more than $6/hour"; + } diff --git a/ase/test/awk/emp-026.awk b/ase/test/awk/emp-026.awk new file mode 100644 index 00000000..1053f105 --- /dev/null +++ b/ase/test/awk/emp-026.awk @@ -0,0 +1,12 @@ +{ + line[NR] = $0; +} + +END { + i = NR; + while (i > 0) + { + print line[i]; + i = i - 1; + } +} diff --git a/ase/test/awk/emp-027.awk b/ase/test/awk/emp-027.awk new file mode 100644 index 00000000..56a40f23 --- /dev/null +++ b/ase/test/awk/emp-027.awk @@ -0,0 +1,8 @@ +{ + line[NR] = $0; +} + +END { + i = NR; + for (i = NR; i > 0; i = i - 1) print line[i]; +} diff --git a/ase/test/awk/emp-en.data b/ase/test/awk/emp-en.data new file mode 100644 index 00000000..029863ff --- /dev/null +++ b/ase/test/awk/emp-en.data @@ -0,0 +1,6 @@ +Beth 4.00 0 +Dan 3.74 0 +Kathy 4.00 10 +Mark 5.00 20 +Mary 5.50 22 +Susie 4.25 18 diff --git a/ase/test/awk/emp-ko.data b/ase/test/awk/emp-ko.data new file mode 100644 index 00000000..54f11456 --- /dev/null +++ b/ase/test/awk/emp-ko.data @@ -0,0 +1,6 @@ +베쓰 4.00 0 +단 3.74 0 +케이티 4.00 10 +마크 5.00 20 +메리 5.50 22 +수지 4.25 18 diff --git a/ase/test/awk/emp.data b/ase/test/awk/emp.data index 4c2dcb24..029863ff 100644 --- a/ase/test/awk/emp.data +++ b/ase/test/awk/emp.data @@ -1,4 +1,4 @@ -Beth 4.00 0 +Beth 4.00 0 Dan 3.74 0 Kathy 4.00 10 Mark 5.00 20 diff --git a/ase/test/awk/ite-001.awk b/ase/test/awk/ite-001.awk new file mode 100644 index 00000000..02f1e014 --- /dev/null +++ b/ase/test/awk/ite-001.awk @@ -0,0 +1,7 @@ +{ + i = 1; + while (i <= $3) { + printf ("\t%.2f\n", $1*(1+$2)**i); + i = i + 1; + } +} diff --git a/ase/test/awk/ite-002.awk b/ase/test/awk/ite-002.awk new file mode 100644 index 00000000..17147dff --- /dev/null +++ b/ase/test/awk/ite-002.awk @@ -0,0 +1,4 @@ +{ + for (i = 1; i <= $3; i=i+1) + printf ("\t%.2f\n", $1*(1+$2)**i); +}