Codebase list libmawk / debian/1.0.2-3 src / example_apps / 91_custom_vio_re / test.awk
debian/1.0.2-3

Tree @debian/1.0.2-3 (Download .tar.gz)

test.awk @debian/1.0.2-3raw · history · blame

BEGIN {
	print "script: BEGIN test.awk"
	print "Hello world!" > "/dev/hash/4"
	print "Hello universe!" > "/dev/hash/6"
}

END {
	print "end." > "/dev/hash/4"
	print "END!" > "/dev/hash/6"
	getline val4 < "/dev/hash/4"
	getline val6 < "/dev/hash/6"
	print "script: END: " val4, val6

#	works even after reopeninig:
	close("/dev/hash/6")
	getline val6 < "/dev/hash/6"
	print "script: END: second time 6:"  val6

# reopen
	close("/dev/hash/6")
	print "new thing" > "/dev/hash/6"
	getline val6 < "/dev/hash/6"
	print "script: END: third time 6:"  val6
}