Re: try to open file descriptor for input with 'exec' fails

2007-11-05 Thread Chet Ramey
[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

Re: try to open file descriptor for input with 'exec' fails

2007-11-02 Thread Paul Jarc
[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

try to open file descriptor for input with 'exec' fails

2007-11-02 Thread juergen
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