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


Message #8 received at 22128 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: "Nellis, Kenneth" <Kenneth.Nellis <at> xerox.com>, 22128 <at> debbugs.gnu.org
Subject: Re: bug#22128: dirname enhancement
Date: Thu, 10 Dec 2015 01:45:43 +0000
tag 22128 notabug
close 22128
stop

On 09/12/15 17:31, Nellis, Kenneth wrote:
> I frequently need to extract the `dirname's from a list of files,
> so dirname should have an option to take its input from a
> file, e.g.:
> 
> dirname -f <filename>

xargs dirname < filename

> where <filename> could be "-" for stdin.
> 
> E.g., to get a list of directories that contain a specific
> file: 
> 
> find -name "xyz.dat" | dirname -f -

find -name "xyz.dat" -print0 | xargs -r0 dirname

> The same would be good for `basename' as well.

xargs basename -a < filename

thanks,
Pádraig.





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.