[EMAIL PROTECTED] wrote:
> Bash Version: 3.2
> Patch Level: 25
> Release Status: release
>
> Description:
> In the following script i try to open a free file
> descriptor for input from a file.
> The script should read lines out of a textfile,
> output goes to stdout.
> This works fine till my
[EMAIL PROTECTED] wrote:
> ./doit: line 29: exec: 3: not found
>
> This is the line where i try to open the file descriptor
> for input:
> exec ${fd}<$inf
Try this:
eval "exec ${fd}< "'"$inf"'
And likewise, when closing the descriptor:
eval "exec ${fd}>&-"
paul
Configuration Information [Automatically generated, do not change]:
Machine: i586
OS: linux-gnu
Compiler: gcc -I/usr/src/packages/BUILD/bash-3.2
-L/usr/src/packages/BUILD/bash-3.2/../readline-5.2
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i586'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYP