[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



Also, your script assumes the output of find wont overflow a list.

I assume that is a problem?

I did:

find .... > /tmp/files
cat /tmp/files | while read orig_path
do
...
done

Isn't that safer than your approach?

Greg


On Thu, 10 Mar 2005 18:50:48 -0500, Geoffrey <esoteric at 3times25.net> wrote:
> Greg Freemyer wrote:
> 
> > To do that, I need to create a variable dest_file_name that takes the
> > '/' and replaces them with '-' chars.  I know you can do that in the
> > shell, but I've forgotten how.
> 
> How about a single for script to do it all?
> 
> Set DIR and PATTERN appropriately...
> 
> for fn in $(find DIR -name PATTERN -print); do
> print cp $fn $(echo $fn|tr '/' '-')
> done
> 
> --
> Until later, Geoffrey
> _______________________________________________
> Ale mailing list
> Ale at ale.org
&gt; <a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>
&gt;


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00213" href="msg00213.html">[ale] editing variables in bash (or shell)</a></strong>
<ul><li><em>From:</em> esoteric at 3times25.net (Geoffrey)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00203" href="msg00203.html">[ale] editing variables in bash (or shell)</a></strong>
<ul><li><em>From:</em> greg.freemyer at gmail.com (Greg Freemyer)</li></ul></li>
<li><strong><a name="00210" href="msg00210.html">[ale] editing variables in bash (or shell)</a></strong>
<ul><li><em>From:</em> esoteric at 3times25.net (Geoffrey)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00211.html">[ale] editing variables in bash (or shell)</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00213.html">[ale] editing variables in bash (or shell)</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00211.html">[ale] editing variables in bash (or shell)</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00213.html">[ale] editing variables in bash (or shell)</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00212"><strong>Date</strong></a></li>
<li><a href="threads.html#00212"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>