August 2006
Beginner
448 pages
9h 44m
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, in this example, an address book file.
[ejr@hobbes manipulate]$ awk '{ print $1 }' → address.book Schmidt, Feldman, Brown, Smith, Jones, [ejr@hobbes manipulate]$ |
De-what?A delimited file uses a specific character to show ... |
Read now
Unlock full access