<?xml version="1.0" encoding="windows-1252"?>
<node id="296904" title="Re^3: Think for yourself. (learn your tools (bash))" created="2003-10-06 07:17:04" updated="2005-07-05 18:23:38">
<type id="11">
note</type>
<author id="114691">
Aristotle</author>
<data>
<field name="doctext">
&lt;blockquote&gt;&lt;em&gt;
&lt;code&gt;
$ fgrep blah &lt;foo.txt | consolidate | dump
$ preproc &lt;foo.txt | fgrep blah | consolidate | dump
$ additional &lt;foo.txt | preproc | fgrep blah | consolidate | dump

# vs

$ cat foo.txt | fgrep blah | consolidate | dump
$ cat foo.txt | preproc | fgrep blah | consolidate | dump
$ cat foo.txt bar.txt | additional | preproc | fgrep blah | consolidate | dump
$ real_stream | additional | preproc | fgrep blah | consolidate | dump
&lt;/code&gt;
&lt;/em&gt;&lt;/blockquote&gt;

First of all, you're using a shell that's not braindead. Take the time to absorb its expressiveness.

&lt;code&gt;
$ &lt; foo.txt fgrep blah | consolidate | dump
$ &lt; foo.txt preproc | fgrep blah | consolidate | dump
$ &lt; foo.txt additional | preproc | fgrep blah | consolidate | dump
&lt;/code&gt;

Yes, that's valid code, go ahead and try. And you still don't need to edit more than one place to add multiple files.

&lt;code&gt;
$ &lt; foo.txt fgrep blah | consolidate | dump
$ &lt; foo.txt preproc | fgrep blah | consolidate | dump
$ &lt;(cat foo.txt bar.txt) additional | preproc | fgrep blah | consolidate | dump
$ real_stream | additional | preproc | fgrep blah | consolidate | dump
&lt;/code&gt;

You don't need crutches in &lt;tt&gt;bash&lt;/tt&gt;. If you need them, something is wrong with your tools.

&lt;div class="pmsig"&gt;&lt;div class="pmsig-114691"&gt;
&lt;p align="right"&gt;&lt;em&gt;Makeshifts last the longest.&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
296742</field>
<field name="parent_node">
296869</field>
</data>
</node>
