cat > script <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
header
	print "==============", newline;
	end;

footer
	print "---------------";
	end;

print "dummy";
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 755 script
cat > stdout <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
==============
dummy































































---------------
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 stdout
cat > tag <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
check that a simple footer not ending with a newline appears on the last line
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 tag
