Subject: bug#22128: dirname enhancement

From: Stephane Chazelas <[email-masked]>
Date: Fri, 11 Dec 2015 22:08:15 +0000

2015-12-11 18:38:15 +0000, Pádraig Brady:
[...]
> Both GNU basename and dirname since 8.16 (2012) got
> the -z option to make the _output_ post-processable,
> along with support for processing multiple inputs.
[...]

Indeed.

And I can see GNU basename takes a -a option to accept more than
one file path (and take the suffix to strip with -s which is
how basename should have been designed in the first place) so
one can do:

< list xargs -r0 basename -az --

Or

< list xargs -r0 basename -azs .txt --

and have a minimum number of invocations of basename and a
post-processable output.

All good. Thanks.

-- 
Stephane