First page Back Continue Last page Overview Graphics
Example 3-1: awk command
Printing selected number of columns
We often need to have a subset of columns from a file having many columns. For example in file example3_awk/brojen.txt, we need to have latitude and longitude columns (cols 5 and 6). To extract these columns, we do as follow,
awk '{print $5, $6}' brojen.txt