<?xml version="1.0" encoding="windows-1252"?>
<node id="929366" title="Re^2: Testing &lt;&gt;" created="2011-10-03 11:35:59" updated="2011-10-03 11:35:59">
<type id="11">
note</type>
<author id="961">
Anonymous Monk</author>
<data>
<field name="doctext">
That works for
&lt;code&gt;
/tmp/&gt;echo "hello world\n" | myscript
&lt;/code&gt;
and now called on its own doesn't hang 
&lt;code&gt;
/tmp/&gt;myscript
&lt;/code&gt;
but there again its not clear how a usage message could be printed out.
&lt;p&gt;
But it now fails when passed a filename
&lt;code&gt;
/tmp/&gt;cat x
   October 2011
 S  M Tu  W Th  F  S
                   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
/tmp/myscript x
&lt;/code&gt;
it doesn't print the contents of the file :-(

Isn't there a simpler solution? I thought that this would have a simple, forehead slapping, solution.



</field>
<field name="root_node">
929359</field>
<field name="parent_node">
929360</field>
<field name="reputation">
9</field>
</data>
</node>
