/section

section - print indented sections of a text file matching a pattern

Primary LanguageGoGNU General Public License v3.0GPL-3.0

This is an implementation of the "section" filter in Go.

The section filter can be used to extract indented sections of text
based on lines that match a regular expression or a fixed string.

This can be helpful when working with, e.g., Python code, Makefiles,
or Free Range Routing (FRR) configuration files.

By default, the matching lines and any indented sections under the
matching lines are printed.  Using options, the section start can be
changed to be at an earlier line than the pattern match.

By default, tab stops are assumed to be 8 characters wide.  Optionally,
the tab stop size can be adjusted.

Use "section --help" for basic usage information and option description.

At the section homepage[1], you can read an HTML version of the section
manual page[2].

Links:
[1] https://www.unix-ag.uni-kl.de/~auerswal/section/
[2] https://www.unix-ag.uni-kl.de/~auerswal/section/section.1.html