November 1998
Beginner
368 pages
7h 58m
English
While sed is line-oriented and lets you fiddle and diddle to your heart's content, awk is field-oriented and is ideal for manipulating database or comma-delimited files. For example, if you have an address book file, you can use awk to find and change information in fields you specify, as in Code Listing 6.11. In the following steps, we'll show you a sampling of the things you can do using awk to modify an address book file.
To change files with awk:
1. |
awk '{ print $1 }' address. book
|
Read now
Unlock full access