GNU bug report logs - #22128
dirname: accept file list input

Previous Next

Package: coreutils;

Reported by: "Nellis, Kenneth" <Kenneth.Nellis <at> xerox.com>

Date: Thu, 10 Dec 2015 01:09:02 UTC

Severity: wishlist

Tags: wontfix

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stephane Chazelas <stephane.chazelas <at> gmail.com>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 22128 <at> debbugs.gnu.org
Subject: bug#22128: dirname enhancement
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




This bug report was last modified 6 years and 215 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.