Every Unix tool does four-and-a-half things:
- parse command line arguments in a slightly different way from other tools
- parse some ad hoc input format specific to itself
- do one or more actual jobs
- produce output in its own ad hoc format
- produces a termination status; here there can be variations: tools written "void main" that return a nondeterministic status; tools that use multiple nonzero codes for multiple interesting non-success conditions.
This messy way of doing things has "won" in AI ecosystems, I suppose.