|
| From: | Jeff Blaine |
| Subject: | [coreutils] basename/dirname can't handle stdin? |
| Date: | Wed, 12 Jan 2011 13:43:39 -0500 |
| User-agent: | Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 |
I was surprised to find this today.
The following fails:
echo /some/place/foo.txt | basename
This also fails:
find /somewhere -print | xargs basename
This *does* work though, somehow, when the above does not:
echo /some/place/foo.txt | xargs basename
What is going on here? dirname is the same way.
| [Prev in Thread] | Current Thread | [Next in Thread] |