In ksh 2014-01-14 beta on OS X 10.7.5, when a file is opened as file
descriptor 3 for reading in an interactive shell, a subsequent "read"
command fails to read a line from the file. This is not an issue from
scripts, or when file descriptor 4 is used.

========================================
$ echo ${.sh.version}
Version AIJM 93v- 2014-01-14
$ type ksh
ksh is a tracked alias for /opt/ksh/2014-01-14-beta/bin/ksh
$ cat test.txt
LINE1
LINE2
LINE3
$ cat test.sh
exec 3< test.txt
read -u 3 var
echo "var: ${var}"
$ ksh  test.sh
var: LINE1
$ exec 3< test.txt
$ read -u 3 var
$ echo "var: ${var}"
var:
$ exec 4< test.txt
$ read -u 4 var
$ echo "var: ${var}"
var: LINE1
========================================

--
Nathan Weeks
IT Specialist
USDA-ARS Corn Insects and Crop Genetics Research Unit
http://weeks.public.iastate.edu/
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to