bug-bash
[Top][All Lists]
Advanced

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

Re: [5.3-alpha] ">& /some/file" would fail when /some/file already exist


From: Grisha Levit
Subject: Re: [5.3-alpha] ">& /some/file" would fail when /some/file already exists
Date: Thu, 25 Apr 2024 18:05:41 -0400

On Thu, Apr 25, 2024, 14:55 Chet Ramey <chet.ramey@case.edu> wrote:

> On 4/25/24 12:18 PM, Clark Wang wrote:
> > (I'm using the "devel" branch as the "bash-5.3-testing" branch failed
> > to build for me. HEAD: 8c8daff1e3661c)
> >
> > To reproduce:
> >
> > $ bash53 --norc
> > bash53-5.3# touch /tmp/file
> > bash53-5.3# echo >& /tmp/file
> > bash53: /tmp/file: File exists
> > bash53-5.3#
>
> I can't reproduce it on macOS.
>
> $ ./bash --norc
> $ touch some.file
> $ echo >&some.file
> $ rm some.file
> $ touch /tmp/file
> $ echo >& /tmp/file
> $ rm /tmp/file
> $ echo $BASH_VERSION
> 5.3.0(1)-alpha
>

Seems to happen if the target is a symlink:

$ rm -f bar foo
$ ln -s bar foo
$ >& foo
bash: foo: File exists


reply via email to

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