Study sets, textbooks, questions
Upgrade to remove ads
Practice quiz over make and awk
Terms in this set (10)
How does awk work?
awk uses a program written in the awk language, and applies it to every line in its input file, writing to its output file as necessary.
How do you input a long target line to make it more readable?
Split it across lines by ending it with a \ followed by a newline, and continue the target line indented on the next line. make treats the backslash/newline and all leading spaces on the next line as a single space.
What is make used for?
Keep computer files up to date automatically.
What is a makefile?
makefile is the file that describes the dependencies between files, and the actions to take if the dependencies get out of date.
Where does make find its makefile, and what are the default makefile names?
make looks in the current directory, and the default file names are makefile and Makefile. (GNU make looks first for GNUmakefile)
What are the parts of an awk script?
1. The BEGIN block, done before processing the text file.
2. The body block applied to every line in the file.
3 The END block, done after all lines are processed.
What are the prerequisites?
The prerequisites are the filenames of the files used to create the target. They follow the targets and the colon, on the same line, space separated.
What are recipes? Where are they?
Recipes are actions that make carries out to create the targets.
They are on lines immediately following the target line, and they must begin with a tab.
What is a target in a makefile, and where is it in the makefile?
The target is the filename to be checked against the prerequisites. It starts in the first character of a line and ends with a space and a colon. There can be a list of targets colon, with spaces between the targets.
To avoid duplicating long lists of prerequisites, what can you do?
Define a variable with the list in it, and use the variable.
variable = file1 file2 file3 ...
Sets with similar terms
Chapter 11: Written Correspondence
Quiz 1 (Units 1-3)
Understanding Business Document Format -- kandi cox
Other sets by this creator
Practice quiz over git
Practice quiz over dd, tar, compression, etc
Practice quiz over pipes, redirection and filters