LUX 211 - Shell Programming
Review for the Third Test
The following questions are provided to help you study for
the third test. Do not expect to see these exact questions on the test.
- What kind of files can be processed by an awk command?
- Other than files, what else can we hand to awk for processing?
- Name two other versions of awk, and explain their names.
- What are the four general sections of a classic awk command?
- What does the -f switch mean to awk?
- What does the -F switch mean to awk?
- Aside from the main program section of an awk script, what are the two optional sections that you may wish to use?
- What is the difference between the three sections of an awk script from the question above?
- When entering an awk script on the command line, what should be the
first character that follows the space after the options?
- What are the two parts we generally expect to see in an awk
command line script? In what circumstance can we leave out one or the
- What can we put in the pattern section? Must it be an actual pattern?
- With respect to data files that awk processes, what is a delimiter?
- What is the meaning of a tilde operator in an awk pattern?
Why is it better than an operator you might use if you don't know about
- What is the purpose of putting a forward slash at each end of a pattern in awk?
- What is the bc utility in bash?
- What is meant by a double star operator in awk? What other operator is used for this pupose?
- What is the meaning of the += operator?
- What do positional variables stand for in awk?
- What is the meaning of the awk builtin variable NF? Why is it necessary?
- If you call an awk script from a shell script, what do you need to know about each of their variables?
- When you write a program, what are the three classic questions to ask yourself and your requester?
- In an awk action/program section, how should you write the code for a math operation?
- If we write a script for awk, how should the file that holds the script end?
- How many files can be given to awk for processing?