*** empty log message ***
This commit is contained in:
1
ase/test/awk/cou-001.awk
Normal file
1
ase/test/awk/cou-001.awk
Normal file
@ -0,0 +1 @@
|
||||
{ print $1, $3; } # print country name and population
|
15
ase/test/awk/cou-002.awk
Normal file
15
ase/test/awk/cou-002.awk
Normal file
@ -0,0 +1,15 @@
|
||||
BEGIN {
|
||||
FS = "\t";
|
||||
printf ("%10s %6s %5s %s\n\n",
|
||||
"COUNTRY", "AREA", "POP", "CONTINENT");
|
||||
}
|
||||
|
||||
{
|
||||
printf ("%10s %6d %5d %s\n", $1, $2, $3, $4);
|
||||
area = area + $2;
|
||||
pop = pop + $3;
|
||||
}
|
||||
|
||||
END {
|
||||
printf ("\n%10s %6d %5d\n", "TOTAL", area, pop);
|
||||
}
|
1
ase/test/awk/cou-003.awk
Normal file
1
ase/test/awk/cou-003.awk
Normal file
@ -0,0 +1 @@
|
||||
$3/$2 >= 0.5
|
11
ase/test/awk/cou-en.data
Normal file
11
ase/test/awk/cou-en.data
Normal file
@ -0,0 +1,11 @@
|
||||
USSR 8649 275 Asia
|
||||
Canada 3852 25 North America
|
||||
China 3705 1032 Asia
|
||||
USA 3615 237 North America
|
||||
Brazil 3286 134 South America
|
||||
India 1267 746 Asia
|
||||
Mexico 762 78 North America
|
||||
France 211 55 Europe
|
||||
Japan 144 120 Asia
|
||||
Germany 96 61 Europe
|
||||
England 94 56 Europe
|
Reference in New Issue
Block a user