*** empty log message ***
This commit is contained in:
parent
4ac00e70e8
commit
a374fe502e
7
ase/test/awk/emp-025.awk
Normal file
7
ase/test/awk/emp-025.awk
Normal file
@ -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";
|
||||||
|
}
|
12
ase/test/awk/emp-026.awk
Normal file
12
ase/test/awk/emp-026.awk
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
line[NR] = $0;
|
||||||
|
}
|
||||||
|
|
||||||
|
END {
|
||||||
|
i = NR;
|
||||||
|
while (i > 0)
|
||||||
|
{
|
||||||
|
print line[i];
|
||||||
|
i = i - 1;
|
||||||
|
}
|
||||||
|
}
|
8
ase/test/awk/emp-027.awk
Normal file
8
ase/test/awk/emp-027.awk
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
line[NR] = $0;
|
||||||
|
}
|
||||||
|
|
||||||
|
END {
|
||||||
|
i = NR;
|
||||||
|
for (i = NR; i > 0; i = i - 1) print line[i];
|
||||||
|
}
|
6
ase/test/awk/emp-en.data
Normal file
6
ase/test/awk/emp-en.data
Normal file
@ -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
|
6
ase/test/awk/emp-ko.data
Normal file
6
ase/test/awk/emp-ko.data
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
베쓰 4.00 0
|
||||||
|
단 3.74 0
|
||||||
|
케이티 4.00 10
|
||||||
|
마크 5.00 20
|
||||||
|
메리 5.50 22
|
||||||
|
수지 4.25 18
|
@ -1,4 +1,4 @@
|
|||||||
Beth 4.00 0
|
Beth 4.00 0
|
||||||
Dan 3.74 0
|
Dan 3.74 0
|
||||||
Kathy 4.00 10
|
Kathy 4.00 10
|
||||||
Mark 5.00 20
|
Mark 5.00 20
|
||||||
|
7
ase/test/awk/ite-001.awk
Normal file
7
ase/test/awk/ite-001.awk
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
i = 1;
|
||||||
|
while (i <= $3) {
|
||||||
|
printf ("\t%.2f\n", $1*(1+$2)**i);
|
||||||
|
i = i + 1;
|
||||||
|
}
|
||||||
|
}
|
4
ase/test/awk/ite-002.awk
Normal file
4
ase/test/awk/ite-002.awk
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
for (i = 1; i <= $3; i=i+1)
|
||||||
|
printf ("\t%.2f\n", $1*(1+$2)**i);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user