Hacker News new | ask | show | jobs
by dhamidi 3856 days ago
Why should basename accepts its argument on stdin? It doesn't act as a filter, processing a stream of data, but rather as a plain function.
1 comments

> 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]