[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Tue Nov 16 13:26:28 2004 -->
- <!--x-from-r13: puevfgbcure ng oretreba.pbz (Quevfgbcure Pretreba) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: [email protected] -->
- <!--x-reference: [email protected] -->
- <!--x-reference: [email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] help with a tiny shell script - correction -->
- <li><em>date</em>: Tue Nov 16 13:26:28 2004</li>
- <li><em>from</em>: christopher at bergeron.com (Christopher Bergeron)</li>
- <li><em>in-reply-to</em>: <<a href="msg00705.html">[email protected]</a>></li>
- <li><em>references</em>: <<a href="msg00692.html">[email protected]</a>> <<a href="msg00693.html">[email protected]</a>> <<a href="msg00694.html">[email protected]</a>> <<a href="msg00705.html">[email protected]</a>></li>
- <li><em>subject</em>: [ale] help with a tiny shell script - correction</li>
>>>>>>"Christopher" == Christopher Bergeron <christopher at bergeron.com> writes:
>>>>>>
>>>>>>
>
> Christopher> Correction: the for line should read: for i in `\ls
> Christopher> *.csv`; do cat $i >> append.csv; echo -e "\n" >>
> Christopher> append.csv; done (for i in backtick backslash ls
> Christopher> start dot csv backtick semicolon ...)
>
>Using ls to generate a list of files from the list of files the glob
>your shell just expanded is kind of pointless (akin to a useless use
>of cat :), and on some platforms with enough matching files ls might
>fail if expands into too many arguments. Just say:
>
>
>for i in *.csv ; do
> # ...
>done
>
>
>and let the shell do its thing.
>
>
Yeah, I just noticed that. It was late at night when I wrote the
original email. I guess yesterday was just a long day.
-CB
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00692" href="msg00692.html">[ale] help with a tiny shell script</a></strong>
<ul><li><em>From:</em> jloden at toughguy.net (jay)</li></ul></li>
<li><strong><a name="00693" href="msg00693.html">[ale] help with a tiny shell script</a></strong>
<ul><li><em>From:</em> christopher at bergeron.com (Christopher Bergeron)</li></ul></li>
<li><strong><a name="00694" href="msg00694.html">[ale] help with a tiny shell script - correction</a></strong>
<ul><li><em>From:</em> christopher at bergeron.com (Christopher Bergeron)</li></ul></li>
<li><strong><a name="00705" href="msg00705.html">[ale] help with a tiny shell script - correction</a></strong>
<ul><li><em>From:</em> fletch at phydeaux.org (Fletch)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00714.html">[ale] OT: Court tomorrow</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00716.html">[ale] Linux for "normal" people?</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00705.html">[ale] help with a tiny shell script - correction</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00695.html">[ale] help with a tiny shell script</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00715"><strong>Date</strong></a></li>
<li><a href="threads.html#00715"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>