On 4/8/24 9:37 PM, squeaky wrote:

Bash Version: 5.2 Patch Level: 21 Release Status: release

Description:

         Running
                 echo test >& "quote'test"
         should create the file "quote'test", but it creates "quotetest" 
instead.

Repeat-By: echo test >& "quote'test"

Thanks for the report. This is specific to this form of redirection. The
issue is that the WORD following the >& is expanded multiple times, since
it has to be expanded once to determine whether it's a number, filename,
`-', or empty. Once it's expanded, and known to be a filename, it shouldn't
be expanded again.

Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/


Reply via email to