Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
8 Cards in this Set
- Front
- Back
awk was the most powerful utility for text manipulation and report writing until the advent of what?
|
Perl
|
|
What is the generic syntax for awk?
|
awk options 'selection_criteria {action}' file(s)
|
|
What is the purpose of the selection component in awk?
|
filters inoput and selects lines for the action component to act on
|
|
How are fields in awk numbered?
|
$1, $2, and so on
|
|
How does awk address an entire line?
|
$0
|
|
If the action component is missing from awk, what is the default action?
|
Printing
|
|
What is the difference between print and print $0? Is the print statement necessary for printing a line?
|
Both print the entire line. print is not necessary if the selcetion criteria is specified
|
|
Implement the following commands in awk:
(i) head -n 5 (ii) sed -n '5,10p' (iii) tail +20 (iv) grep negroponte |
(i) awk 'NR <=5' foo
(ii) awk 'NR == 5, NR ==10' foo (iii) awk 'NR > 20' foo (iv) awk '/negroponte/' foo |