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.

  1. What kind of files can be processed by an awk command?

  2. Other than files, what else can we hand to awk for processing?

  3. Name two other versions of awk, and explain their names.

  4. What are the four general sections of a classic awk command?

  5. What does the -f switch mean to awk?

  6. What does the -F switch mean to awk?

  7. Aside from the main program section of an awk script, what are the two optional sections that you may wish to use?

  8. What is the difference between the three sections of an awk script from the question above?

  9. When entering an awk script on the command line, what should be the first character that follows the space after the options?

  10. 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 other?

  11. What can we put in the pattern section? Must it be an actual pattern?

  12. With respect to data files that awk processes, what is a delimiter?

  13. 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 the tilde?

  14. What is the purpose of putting a forward slash at each end of a pattern in awk?

  15. What is the bc utility in bash?

  16. What is meant by a double star operator in awk? What other operator is used for this pupose?

  17. What is the meaning of the += operator?

  18. What do positional variables stand for in awk?

  19. What is the meaning of the awk builtin variable NF? Why is it necessary?

  20. If you call an awk script from a shell script, what do you need to know about each of their variables?

  21. When you write a program, what are the three classic questions to ask yourself and your requester?

  22. In an awk action/program section, how should you write the code for a math operation?

  23. If we write a script for awk, how should the file that holds the script end?

  24. How many files can be given to awk for processing?