This file is indexed.

/usr/share/doc/sgmls-doc/sgmlspl/pushoutput.html is in sgmls-doc 1.03ii-32.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<HTML>
<HEAD>
<TITLE>How do I use push_output?</TITLE>
</HEAD>
<BODY>

<P><B>Links</B>: <A HREF=popoutput.html>Next</A> <A HREF=output.html>Previous</A> <A HREF=sgmlspl.html>Up</A> <A HREF=sgmlspl.html>Top</A></P>

<H1>How do I use <TT>push_output</TT>?</H1>

<P>The subroutine
<TT>push_output(<IT>type</IT>[,<IT>data</IT>])</TT>
takes two arguments: the <IT>type</IT>, which is always
required, and the <IT>data</IT>, which is needed for
certain types of output.  Table 3 lists the different types which you
can push onto the output stack.</P>


<H3>Table 3: Types for <TT>push_output</TT></H3>

<HR>
<DL>
<DT><B>Type</B></DT>
<DD><TT>'handle'</TT></DD>
<DT><B>Data</B></DT>
<DD>a filehandle</DD>
<DT><B>Description</B></DT>
<DD>Send all output to the supplied filehandle.</DD>

</DL>
<HR>


<DL>
<DT><B>Type</B></DT>
<DD><TT>'file'</TT></DD>
<DT><B>Data</B></DT>
<DD>a filename</DD>
<DT><B>Description</B></DT>
<DD>Open the supplied file for writing, erasing its current
contents (if any), and send all output to it.</DD>

</DL>
<HR>


<DL>
<DT><B>Type</B></DT>
<DD><TT>'append'</TT></DD>
<DT><B>Data</B></DT>
<DD>a filename</DD>
<DT><B>Description</B></DT>
<DD>Open the supplied file for writing and append all output to its
current contents.</DD>

</DL>
<HR>


<DL>
<DT><B>Type</B></DT>
<DD><TT>'pipe'</TT></DD>
<DT><B>Data</B></DT>
<DD>a shell command</DD>
<DT><B>Description</B></DT>
<DD>Pipe all output to the supplied shell command.</DD>

</DL>
<HR>


<DL>
<DT><B>Type</B></DT>
<DD><TT>'string'</TT></DD>
<DT><B>Data</B></DT>
<DD>a string [optional]</DD>
<DT><B>Description</B></DT>
<DD>Append all output to the supplied string, which will be
returned by <TT>pop_output</TT>.</DD>

</DL>
<HR>


<DL>
<DT><B>Type</B></DT>
<DD><TT>'nul'</TT></DD>
<DT><B>Data</B></DT>
<DD>[none]</DD>
<DT><B>Description</B></DT>
<DD>Ignore all output.</DD>

</DL>
<HR>


<P>Because the output is stack-based, you do not lose the previous
output destination when you push a new one.  This is especially
convenient for dealing with data in tree-structures, like <A HREF="http://www.sil.org/sgml/sgml.html"><B>SGML</B></A> data
-- for example, you can capture the contents of sub-elements as
strings, ignore certain types of elements, and split the output from
one <A HREF="http://www.sil.org/sgml/sgml.html"><B>SGML</B></A> parse into a series of sub-files.  Here are some examples:</P>

<P>
<PRE>push_output('string');                  # append output to an empty string
push_output('file','/tmp/foo');         # send output to this file
push_output('pipe','mail webmaster');   # mail output to 'webmaster' (!!)
push_output('nul');                     # just ignore all output</PRE>
</P>

<P><B>Links</B>: <A HREF=popoutput.html>Next</A> <A HREF=output.html>Previous</A> <A HREF=sgmlspl.html>Up</A> <A HREF=sgmlspl.html>Top</A></P>


<ADDRESS>David Megginson <A HREF="mailto:dmeggins@aix1.uottawa.ca">&lt;dmeggins@aix1.uottawa.ca&gt;</A></ADDRESS>
</BODY>
</HTML>