Pierre Gaston wrote:

>>  > On Tue, Aug 26, 2008 at 5:41 AM, R. Bernstein <[EMAIL PROTECTED]> 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.


Reply via email to