Subject: dirname enhancement

From: "Nellis, Kenneth" <[email-masked]>
Date: Wed, 9 Dec 2015 17:31:23 +0000

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>

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 -

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

--Ken Nellis