3 ms·
> Why should basename accepts its argument on stdin? Because a lot of people have use for a filter version > It doesn't act as a filter, processing a stream
by protomyth 11y ago
> Why should basename accepts its argument on stdin?
Because a lot of people have use for a filter version
> It doesn't act as a filter, processing a stream of data, but rather as a plain function.
That's the problem with a lot commands, some work as filters, some as simple commands, and other do both. The reasoning on the decision is confusing.
[edit: yes, combining with xargs will often work]