somebody here asked me just now. i have a list of files. i want to move them to filename.old. What is the simplest one liner?
i suggested this.
$ head a.txt
Tools.tex
anbe_sivam.tex
appendix.tex
bg.tex
cc-upgrade.tex
chandru_bank.tex
demo1.tex
ding.tex
eso-ex2.tex
ex4.tex
$ perl -pi -e 's/(.*)/mv \1 \1\.old/' a.txt
$ head a.txt
mv Tools.tex Tools.tex.old
mv anbe_sivam.tex anbe_sivam.tex.old
mv appendix.tex appendix.tex.old
mv bg.tex bg.tex.old
mv cc-upgrade.tex cc-upgrade.tex.old
mv chandru_bank.tex chandru_bank.tex.old
mv demo1.tex demo1.tex.old
mv ding.tex ding.tex.old
mv eso-ex2.tex eso-ex2.tex.old
mv ex4.tex ex4.tex.old
me learning perl :-)
anything better?