Closed jgarte closed 2 years ago
It just drops some irrelevant sections from the man page. Briefly, awk implicitly loops over all the "records" in the input file, which by default are lines. The input is the README.md file.
BEGIN {
output = 1;
}
At the start of the program, initialise a variable.
/^See some.*screen shots/ {
next;
}
If the current line matches this regexp, skip to the next line.
/^Requirements$/ {
output = 0;
}
If the current line matches this regexp, set output
to 0 (false).
/^Configuration$/ {
output = 1;
}
If the current line matches this regexp, set output
to 1 (true).
output {
print
}
If output
is true, print out the current line.
How does this awk script work generally? Sorry if this is somewhat off topic.
I was just trying to understand what exactly make_man does in the bower.1 Makefile target