[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Equivalent of ksh, zsh {N}<[WORD] ?
From: |
Dave B |
Subject: |
Re: Equivalent of ksh, zsh {N}<[WORD] ? |
Date: |
Tue, 26 Aug 2008 16:33:10 +0200 |
User-agent: |
Thunderbird 2.0.0.16 (X11/20080725) |
Pierre Gaston wrote:
>> > On Tue, Aug 26, 2008 at 5:41 AM, R. Bernstein <rocky@panix.com> wrote:
>> > > Both zsh and ksh have a way to open a file or duplicate a file
>> > > descriptor and let the interpreter pick the descriptor saving the
>> > > newly-allocated file descriptor number in a variable. In particular:
>> > >
>> > > exec {fd}<&0
>> Perhaps you are thinking of the variation without braces?
>>
>
> well, I was thinking of the normal redirection syntax:
> exec 3<&0
>
> I doubt '{fd}<&0' is meaningfull anywhere.....in ksh {fd} tries to
> run the command {fd} like in bash
> in zsh it tries to run the command "fd"
> What are you talking about???
I think he refers to the fact that, with ksh, you can do for instance
$ exec {fd}<&0
$ echo $fd
10
$ exec {fd1}<&0
$ echo $fd1
11
I didn't try on zsh, but with bash you get:
$ exec {fd}<&0
-bash: exec: {fd}: not found
--
D.
- Equivalent of ksh, zsh {N}<[WORD] ?, R. Bernstein, 2008/08/26
- Re: Equivalent of ksh, zsh {N}<[WORD] ?, Pierre Gaston, 2008/08/26
- Re: Equivalent of ksh, zsh {N}<[WORD] ?, R. Bernstein, 2008/08/26
- Re: Equivalent of ksh, zsh {N}<[WORD] ?, Pierre Gaston, 2008/08/26
- Re: Equivalent of ksh, zsh {N}<[WORD] ?,
Dave B <=
- Re: Equivalent of ksh, zsh {N}<[WORD] ?, Pierre Gaston, 2008/08/26
- Re: Equivalent of ksh, zsh {N}<[WORD] ?, Dave B, 2008/08/26
- Re: Equivalent of ksh, zsh {N}<[WORD] ?, R. Bernstein, 2008/08/26
- Re: Equivalent of ksh, zsh {N}<[WORD] ?, Pierre Gaston, 2008/08/26
Re: Equivalent of ksh, zsh {N}<[WORD] ?, Chet Ramey, 2008/08/26
- Re: Equivalent of ksh, zsh {N}<[WORD] ?, R. Bernstein, 2008/08/26
- Re: Equivalent of ksh, zsh {N}<[WORD] ?, Chet Ramey, 2008/08/26
- Re: Equivalent of ksh, zsh {N}<[WORD] ?, R. Bernstein, 2008/08/26
- Re: Equivalent of ksh, zsh {N}<[WORD] ?, Chet Ramey, 2008/08/26
- Re: Equivalent of ksh, zsh {N}<[WORD] ?, R. Bernstein, 2008/08/26