GNU bug report logs -
#9450
Bug report on 'dirname' : when jokers match several files
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Wed, 07 Sep 2011 07:33:30 -0700
with message-id <4E6780BA.70101 <at> cs.ucla.edu>
and subject line Re: bug#9450: Bug report on 'dirname' : when jokers match several files
has caused the GNU bug report #9450,
regarding Bug report on 'dirname' : when jokers match several files
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
9450: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9450
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Hi
Here this a strange behaviour using 'dirname' with joker filename:
>ll /tmp/*.out
ls: /tmp/*.out: No such file or directory
>dirname /tmp/*.out
/tmp
That's OK. But if several files match the argument given :
>ll /home/qualiac/mdl/scriptsJDM/QuaToCov/emission/*.HL
-rw-r--r-- 1 qualiac qualiac 20715696 Sep 6 02:15 /home/qualiac/mdl/scriptsJDM/QuaToCov/emission/M399111H.HL
-rw-r--r-- 1 qualiac qualiac 1181326 Sep 6 02:16 /home/qualiac/mdl/scriptsJDM/QuaToCov/emission/T399111H.HL
-rw-r--r-- 1 qualiac qualiac 225012 Sep 6 02:15 /home/qualiac/mdl/scriptsJDM/QuaToCov/emission/T399211H.HL
>dirname /home/qualiac/mdl/scriptsJDM/QuaToCov/emission/*.HL
dirname: too many arguments
Try `dirname --help' for more information.
That's bad. If I try:
>dirname '/home/qualiac/mdl/scriptsJDM/QuaToCov/emission/*.HL'
/home/qualiac/mdl/scriptsJDM/QuaToCov/emission
That's OK.
Could 'dirname' process only its first parameter ?
Thanks.
----------------------------------------------
UNIX VERSION:
----------------------------------------------
>uname -a
Linux jdm-qualiac-srv-trv.midilibre.com 2.6.9-100.ELsmp #1 SMP Tue Feb 1 12:04:42 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
>uname -r
2.6.9-100.ELsmp
>cat /etc/issue
Red Hat Enterprise Linux ES release 4 (Nahant Update 9)
Kernel \r on an \m
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
On 09/07/11 00:21, Laurent TARRISSE wrote:
> The 'bug' appeared on Linux, because dirname doesn't output the path when
> several arguments are passed to it. :)
The same 'bug' will also appear on Solaris 10; its
dirname does the same thing as GNU/Linux's dirname.
I'm afraid you're fighting an uphill battle here.
I'd fix the script rather than expecting
other implementations to match HP-UX's quirks.
I'm marking this as "done" since I don't expect
the GNU/Linux version to change.
This bug report was last modified 13 years and 340 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.