• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/8

Click to flip

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