bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14023: dirname/basename unexpected results when run by xargs -I


From: Juho-Pekka Kuitunen
Subject: bug#14023: dirname/basename unexpected results when run by xargs -I
Date: Thu, 21 Mar 2013 18:36:21 +0200

Reproduce example;
$ echo "testdir/testfile" | xargs -I '{}' echo '{}', dir: $(echo
dirname '{}') = $(dirname '{}')

Expected output;
testdir/testfile, dir: dirname testdir/testfile = testdir

Actual output;
testdir/testfile, dir: dirname testdir/testfile = .

This behavior seems to be limited to the xargs -I replace-str usage
pattern, any other way I can think of running dirname works fine.
Basename has similarly wonky behavior, it prints the full string
instead of doing any stripping.

Not sure if there's a bug involved (or if it's on the findutils or
coreutils side). Could also just be something silly I'm overlooking.
I've tested this with findutils 4.4.2 and coreutils 8.5 & 8.13 with
identical results.

--
Juho-Pekka Kuitunen





reply via email to

[Prev in Thread] Current Thread [Next in Thread]