I was working with a text file named countries
whose context is the following:
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
I am trying to get the following range pattern to work:
awk '/Europe/, /Asia/' countries
which is supposed to print every line starting from the first instance of the word "Europe", and ending at the first instance of the word "Asia".
So the output that I expected was this:
France 211 55 Europe
Japan 144 120 Asia
But the output that I am getting instead is this:
France 211 55 Europe
Japan 144 120 Asia
Germany 96 61 Europe
England 94 56 Europe
as if the second pattern was not matched. What is happening?