Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
On 11/23/12 2:04 AM, Pierre Gaston wrote:
> It seems rather counter intuitive that the fd is not closed after leaving
> the block.
> With the normal redirection the fd is only available inside the block
>
> $ { : ;} 3>&1;echo bar >&3
> -bash: 3: Bad file descriptor
>
> if 3 is closed why should I expect {fd} to be still open?
Because that's part of the reason to have {x}: so the user can handle the
disposition of the file descriptor himself.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/