bug-bash
[Top][All Lists]
Advanced

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

Re: trap handler scope wrong?


From: Paul Jarc
Subject: Re: trap handler scope wrong?
Date: Sun, 05 Mar 2006 21:13:07 -0500
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux)

Phillip Susi <address@hidden> wrote:
> Chet Ramey wrote:
>> That's about right, but you need >&3 in the trap command.
>
> I did have > &3 in the trap command, see?

You have "> &3".  You need ">&3", without a space.

> I'm a bit worried though about hard coding the fd 3.  Is there a way
> to get the next available fd number and save it in a variable,
> rather than hard code 3?

Unfortunately, no.  You could use a higher number, which would be less
likely to be used, but if you want to be portable to other shells, you
can only go up to 9.


paul




reply via email to

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