Right, but the same people who keep advocating "do one thing and do it well" also keep advocating "Write programs to handle text streams, because that is a universal interface," and there's no way to handle that sort of things with text streams. A "universal interface," whatever that means, cannot carry that metadata.
I know.. It's almost like the people who came up with these ideas 40 years ago didn't think of everything.
There are plenty of ways to do things better with basic text interfaces - a more standardized header format for example.
If most tools just output tabbed separated values with a header, or the same thing vertically.. ie..
foo bar baz
1 2 3
4 5 6
or
foo 1 4
bar 2 5
baz 3 6
It would have been a lot easier to write more "universal" tools that worked with this data.
Or at least more tools like 'ifdata' that is part of moreutils.
$ ifdata -pa wlan0
192.168.1.2
Instead of the mess people come up with to parse ifconfig output.
Bryan Cantrill even said in a presentation something like that it should be "Write programs to handle json text streams, because that is a universal interface" these days.
was to show how sorting by date ascending and size descending could work. 'sort' can sort by different fields in different orders, but to sort times properly you'd need to use ls with `--full-time` or --time-style=long-iso` which is in GNU ls but not the BSD ls on OS X.
You'd end up with something like
ls -l --full-time |sort -k 6,5rn
But that doesn't quite work. Besides, the 'sort -k 6,5rn' instead of 'sort +date,-size' is exactly the kind of thing I was trying to show.
We could have had a sort that let you do '+date,-size', instead we have a 'universal interface'.