Browse Source

add an example of a unix function implemented with \<tokens\>

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@673162 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 17 years ago
parent
commit
ba6d6347ce
1 changed files with 14 additions and 1 deletions
  1. +14
    -1
      docs/manual/CoreTypes/resources.html

+ 14
- 1
docs/manual/CoreTypes/resources.html View File

@@ -887,7 +887,7 @@ larger collection. <strong>Since Ant 1.7.1</strong>.</p>
<h4><a name="tokens">tokens</a></h4>
<p>Includes the <a href="#string">string</a> tokens gathered from a nested
resource collection. Uses the same tokenizers supported by the
<a href="filterchain.html#tokenfilter">TokenFilter</a>. Hint: imaginative
<a href="filterchain.html#tokenfilter">TokenFilter</a>. Imaginative
use of this resource collection can implement equivalents for such Unix
functions as <code>sort</code>, <code>grep -c</code>, <code>wc</code> and
<code>wc -l</code>.</p>
@@ -917,6 +917,19 @@ larger collection. <strong>Since Ant 1.7.1</strong>.</p>
<a href="filterchain.html#linetokenizer">LineTokenizer</a> will be used.
</li>
</ul>
<h4>Examples</h4>
<pre>&lt;concat&gt;
&lt;union&gt;
&lt;sort&gt;
&lt;tokens&gt;
&lt;resources refid="input" /&gt;
&lt;linetokenizer includedelims="true" /&gt;
&lt;/tokens&gt;
&lt;/sort&gt;
&lt;/union&gt;
&lt;/concat&gt;
</pre>
<p>Implements Unix <i>sort -u</i> against resource collection <i>input</i>.</p>
</blockquote>

<h4><a name="setlogic">Set operations</a></h4>


Loading…
Cancel
Save