[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Thu Mar 10 16:43:30 2005 -->
- <!--x-from-r13: tert.serrzlre ng tznvy.pbz (Uert Terrzlre) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: [email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] editing variables in bash (or shell) -->
- <li><em>date</em>: Thu Mar 10 16:43:30 2005</li>
- <li><em>from</em>: greg.freemyer at gmail.com (Greg Freemyer)</li>
- <li><em>in-reply-to</em>: <<a href="msg00205.html">[email protected]</a>></li>
- <li><em>references</em>: <<a href="msg00203.html">[email protected]</a>> <<a href="msg00205.html">[email protected]</a>></li>
- <li><em>subject</em>: [ale] editing variables in bash (or shell)</li>
Thanks
On Thu, 10 Mar 2005 16:24:33 -0500, Asif E. wrote:
> Maybe
>
> dest_file_name=`echo $src_file_name | sed 's%/%-%g'`
>
>
> On Thu, 10 Mar 2005 16:01:45 -0500, Greg Freemyer
> <greg.freemyer at gmail.com> wrote:
> > I'm writing a script to crawl my data disk and collect a bunch of
> > similar files in one place.
> >
> > I can use find to make the list of files.
> >
> > Then I can use a construct like:
> >
> > cat /tmp/files | while read orig_file_name
> > do
> > echo $orig_file_name
> > done
> >
> > to print out the list of files I need to collect.
> >
> > Now I want to collect them in one place without losing the detail of
> > where they came from.
> >
> > I'm thinking something like this would work:
> >
> > cp /data/path/file ./data-path-file
> >
> > 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.
> >
> > Any assistance?
> >
> > Thanks
> > Greg
> > --
> > Greg Freemyer
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > <a rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale">http://www.ale.org/mailman/listinfo/ale</a>
> >
>
</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="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="00205" href="msg00205.html">[ale] editing variables in bash (or shell)</a></strong>
<ul><li><em>From:</em> asifem at gmail.com (Asif E.)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00205.html">[ale] editing variables in bash (or shell)</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00207.html">[ale] What is the topic for the ALE Central meeting tonight?</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00205.html">[ale] editing variables in bash (or shell)</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00242.html">[ale] editing variables in bash (or shell)</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00206"><strong>Date</strong></a></li>
<li><a href="threads.html#00206"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>