mackenzi@thor.acc.stolaf.edu (David MacKenzie) (04/16/89)
echo "hi there" > foo
chmod 0 foo
gawk '
BEGIN {
if (getline < "foo" > 0)
print
else
print "cannot open foo"
exit
}'
Getline hangs if it can't open the file, instead of returning -1.
This is under System V, if that matters.
David MacKenzie
mackenzi@thor.stolaf.edu or edf@rocky2.rockefeller.edu
--
David MacKenzie
mackenzi@thor.stolaf.edu or edf@rocky2.rockefeller.edu