There are a number of builtins in m4 for manipulating text in various ways, extracting substrings, searching, substituting, and so on.
m4
Go to the first, previous, next, last section, table of contents.