11 ms·
A practical issue: how many paths should basename accept on stdin? If more than 1, how should they be delimited?
by yrro 11y ago
A practical issue: how many paths should basename accept on stdin? If more than 1, how should they be delimited?
- andrewchambers 11y agoobviously with a newline like every other unix tool. sort, uniq, grep etc.
- yrro 11y agoBut paths can contain newlines.
- scrollaway 11y agoMost tools that deal with paths delimit them on newlines and support a -z or -0 flag to delimit with \0.