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

[no subject]



I am trying to rename gazillions of files in huge directory tree ....

Found an example ....

ls -d *.php3 | sed 's/\(.*\).php3$/mv "&" "\1.php"/' | sh 

I am trying to adapt it to my needs .....

ls -d * | sed 's/t1-/mv & dsl-/g' | sh

Only one small problem .... I get this

mv t1- dsl-somefile

How to get what sed got into input - full file name ?

Thanks,
Tomas


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00288" href="msg00288.html">[ale] GRRRRRR .... Regular expressions .....</a></strong>
<ul><li><em>From:</em> fletch at phydeaux.org (Fletch)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00286.html">[ale] Suse 8.2 on your laptop</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00288.html">[ale] GRRRRRR .... Regular expressions .....</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00286.html">[ale] Suse 8.2 on your laptop</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00288.html">[ale] GRRRRRR .... Regular expressions .....</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00287"><strong>Date</strong></a></li>
<li><a href="threads.html#00287"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

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