News for hackers. Stuff that matters.
Re:Renaming files with mv without typing the name two times by m463 on Tuesday April 14, 2020 @07:55AM (#22864811)
I never knew that existed.

My first thought was "emacs editing characters already work on the command line."

Then I thought, maybe there are commands you want to be really really sure of before submitting them?

Then I realized I very frequently use very long commands with loops and pipes that might benefit, like:

  for i in *.py; do mv $i AA_$i; done
or a little of both:

  find . -type f |while read f; do if cmp -s "$f" ../new/"$f"; then rm -f "$f"; fi ;done
(thanks!)

There are no comments on this comment yet.