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
will duplicate stdin and save the newly allocated file-descriptor
number to fd. Als
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
>
>
Pierre Gaston writes:
> 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
On Tue, Aug 26, 2008 at 4:49 PM, R. Bernstein <[EMAIL PROTECTED]> wrote:
> Pierre Gaston writes:
> > 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 des
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 v
On Tue, Aug 26, 2008 at 5:33 PM, Dave B <[EMAIL PROTECTED]> wrote:
> 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 de
Pierre Gaston writes:
> On Tue, Aug 26, 2008 at 4:49 PM, R. Bernstein <[EMAIL PROTECTED]> wrote:
> > Pierre Gaston writes:
> > > 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
On Tue, Aug 26, 2008 at 5:38 PM, R. Bernstein <[EMAIL PROTECTED]> wrote:
> Pierre Gaston writes:
> > On Tue, Aug 26, 2008 at 4:49 PM, R. Bernstein <[EMAIL PROTECTED]> wrote:
> > > Pierre Gaston writes:
> > > > On Tue, Aug 26, 2008 at 5:41 AM, R. Bernstein <[EMAIL PROTECTED]>
> wrote:
> > > >
Pierre Gaston wrote:
>> 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
>>
> ah sorry I didn
R. Bernstein 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
>
> will duplicate stdin and save the newly allocated
Chet Ramey writes:
> R. Bernstein 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
> >
> > will d
R. Bernstein wrote:
> Right now what bashdb assumes that file descriptors 4 through 9 are
> free, but it really has no right to assume that. And in fact, GNU
> autoconf configure will use file descriptors in this range. Also using
> 4-9 we is pretty limited in in file descriptors. This is less of
Chet Ramey writes:
> R. Bernstein wrote:
>
> > Right now what bashdb assumes that file descriptors 4 through 9 are
> > free, but it really has no right to assume that. And in fact, GNU
> > autoconf configure will use file descriptors in this range. Also using
> > 4-9 we is pretty limited in
R. Bernstein wrote:
> Chet Ramey writes:
> > R. Bernstein wrote:
> >
> > > Right now what bashdb assumes that file descriptors 4 through 9 are
> > > free, but it really has no right to assume that. And in fact, GNU
> > > autoconf configure will use file descriptors in this range. Also using
>
Chet Ramey writes:
> > Redirections using file descriptors greater than 9 should be used with
> > care, as they may conflict with file descriptors the shell uses
> > internally.
...
> The sentence is more a caution about the previously-mentioned clexec bugs.
> As a practical matter, you
15 matches
Mail list logo