🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by David MacKenzie Sun, 16 Apr 1989 04:49
Gawk 2.10 getline hangs
#1568
Author: David MacKenzie
Date: Sun, 16 Apr 1989 04:49
20 lines
837 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads