<div dir="ltr">This is a good topic for me as I have a problem with regular expressions and changing the filename/target item.<div><br></div><div>Thanks for this.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 29, 2022 at 1:26 PM CrankyOldBugger <<a href="mailto:crankyoldbugger@gmail.com">crankyoldbugger@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Sorry, I neglected to mention dry run mode.. very handy, that. Take it from a guy who's completely bahookee'd entire folders...</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 29, 2022 at 1:18 PM Khalid Baheyeldin <<a href="mailto:kb@2bits.com" target="_blank">kb@2bits.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Just like Doug and Steve, I am in the camp of "create a shell script, edit, then run it" camp. <br></div><div><br></div><div>It often starts with awk:</div><div><br></div><div>ls *show* | awk '{print "mv ", $1, $1}' > x</div><div><br></div><div>Now x has a skeleton like:</div><div><br></div><div>mv show1 show1</div><div>mv show2 show2</div><div><br></div><div>Then I edit using vim according to what I want (tedious part), then run it. <br></div><div><br></div><div>But now that rename has been pointed out, I think I will try to use that instead. <br></div><div>For one thing, it has -v (shows what is being done), and -n (a dry run mode), which</div><div>should assist significantly with the task of renaming. <br></div><br></div>
_______________________________________________<br>
kwlug-disc mailing list<br>
<a href="mailto:kwlug-disc@kwlug.org" target="_blank">kwlug-disc@kwlug.org</a><br>
<a href="https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org" rel="noreferrer" target="_blank">https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org</a><br>
</blockquote></div>
_______________________________________________<br>
kwlug-disc mailing list<br>
<a href="mailto:kwlug-disc@kwlug.org" target="_blank">kwlug-disc@kwlug.org</a><br>
<a href="https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org" rel="noreferrer" target="_blank">https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">110. Labour to keep alive in your breast that little celestial fire called conscience.<br>--George Washington</div>