File descriptors -- cygwyn bash (windows)

view full story

http://www.unix.com – Cygwin bash script was invoked in bash shell as follows: Code: /cygdrive/c/cygwin/bin/bash  test.sh This is content of my script Code: #!/bin/bash  #  exec 3</cygdrive/c/cygwin/home/work/part1.txt  read -u 3 x  echo $x  exec 3<&- Commands work correctly when issued one at a time within bash shell. But when I attempt to run the shell script I get error messages like this: Code: : No such file or directoryc/cygwin/home/work/part1.txt   test.sh: line 4: read: 3: invalid file descriptor: Bad file  descriptor : not foundne 6: exec: (HowTos)