bug-bash
[Top][All Lists]
Advanced

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

Re: BASH bug CDPATH plus redirection


From: Chet Ramey
Subject: Re: BASH bug CDPATH plus redirection
Date: Thu, 28 Jun 2001 18:38:14 -0400

> Yes well umm, the issue is not whether I can get around it, the issue
> is that cd should never echo anything when it successfully executes
> in a script. Perhaps I am wrong in this case to export CDPATH, but if
> I wrote a script which purposely uses CDPATH, it will still fail and
> that is wrong. The unix way is not to give verbosity on success.
> 
> >> (cd dir1 ; tar cf - foo ) >foo.tar ; <foo.tar (cd dir2 ; tar xf - )
> >> BTW, ash does this correctly, bash does not.
> >
> >;-) If there's an area where "ash" is more "correct" than bash, I've not
> >seen it.
> 
> I think you may have seen it now.

It depends on your definition of `correctness'.  Bash does what POSIX
specifies. 

> Again, the issue is not whether there is a workaround or another way. Of 
> course
> there is. The issue is that the shell
> is supposed to accept the redirection at the start of the command. Here is
> another case that bash is getting wrong...
> </etc/passwd for i in 1 2 3
> do
>      read A ; echo $A
> done
> 
> Yep that should work too. Tried it with a ksh implementation I have here.  
> bash
> croaks on that one too.

Doesn't anybody ever read the FAQ?  Question F5.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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