nl, out of coreutils again, looks like a fairly simple program.
Given the proper flags though,
nl suddenly becomes a wild and crazy guy.
Like a lot of things hiding in coreutils, what looks simple has a lot of very cool options. And it’s clear that
nl is capable of handling much more complex arrangements. Watch for options for headers and footers, logical pages and so forth. Most of those things … I don’t even know what they are.😐
I can attest to
nl‘s usefulness; I’ve used it in the past to add sequence numbers to lists, and to number lines from (of all places) within vim.
And considering the acrobatics it might take to do the same thing without
nl, it is definitely a keeper.