Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Somewhat unexpected results of {myfd}>&1 when noclobber set
- X-seq: zsh-workers 31135
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Somewhat unexpected results of {myfd}>&1 when noclobber set
- Date: Sun, 10 Mar 2013 13:11:05 +0100
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=F8SzKSBTAd14d6wINgBAuCM4j7dY36o1nezThgl6L88=; b=qKaW40nL/s90xVqPHuKB0MDneZ+YGehp4HOm3wW9tL+dkPVSH85HafGWIKUMlikxaD BK9G1ODBw2qFfiUqXldC2qDLMxPzlptMxRC2N5+Lo63AGzslOru9ILG55GhcJGDvAe0P +HHjaa1rgU42WVqVZOll1ZrpQbPoL8HSOH7BrM5Nc6XiT/6FQVael0iS1egJmA/yEctf WFMOSVEa4ymUKIOzn9PxdWXXJ4zYMzjutY9n/DhtmObrX2IRXQX30hRMGsw/KvsIrWl1 FY8VHAE4INdbOwtU7i5uC1mCmOJPHurLEMJ3RoAj05WPV0k5FG1uIbKUeyak8KPF4HsI 9flw==
- In-reply-to: <130309071252.ZM19892@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAHYJk3SexAxWnKHSBWCnvcAu7RjC_Go6Sd1Uwn-QujvpYzrnvw@mail.gmail.com> <130309071252.ZM19892@torch.brasslantern.com>
On 9 March 2013 16:12, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> The real question is whether math evaluation is applied when you do
>
> print something >&$bar
>
> If $bar is not evaluated in that context, then it should not be in the
> dup context either, but if it IS evaluated in that context, then it
> should be treated consistently . Guess what:
>
> integer bar=1+1
> print something >&$bar
>
> DOES print to stderr, so I would argue that the current behavior is
> the correct one (except for the spurious warning message).
Well, this 1+1 is evaluated when you assign to bar, not when you do >&$bar...
(not ignoring the rest of the message, just replying to this part for now).
% foo=1+1
% echo $foo
1+1
% print something >&$foo
results in the file 1+1 being created with contents 'something'.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author