On Fri, Oct 31, 2008 at 14:59, Chris F.A. Johnson <[EMAIL PROTECTED]>wrote:

> On 2008-10-31, Clark J. Wang wrote:
> ...
> > # read line <&11    <--- test with fd 11
> > bash: 11: Bad file descriptor
> > #
>
>     You haven't opened file descriptor 11:
>
You're right. I just want to show the different behavior of fd 10 and 11. Fd
10 is closed but afterward read from it reported no error. That's the
problem.

>
> $ (
> exec 11<$HOME/.bashrc
>
> while read <&11
> do
>  printf .
> done
> echo
>
> exec 11<&-
> )
> ................................................................
>
>
> --
>   Chris F.A. Johnson, webmaster         <http://Woodbine-Gerrard.com>
>   ===================================================================
>   Author:
>   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
>

Reply via email to