ordinalsed
Ordinalsed is a command-line text processing tool that extends the traditional stream editor model by introducing ordinal-based addressing. It enables operations such as substitution, deletion, or insertion to be targeted by ordinal positions, including the first, second, third, last, or any Nth occurrence of a pattern, either within each line or across the entire input. The goal is to make precise text transformations that rely on the position of a pattern rather than solely its presence.
Origin and design of ordinalsed trace a lineage to scripting and text-processing needs in software development
Features and syntax commonly associated with ordinalsed include ordinal selectors such as first, second, third, last,
Examples illustrate the core idea: to substitute the first occurrence of a term, a command might resemble