I’ve run into this a few times and I’m curious about automating it. If I want to move a bunch of files matching a pattern to a slightly different pattern, how would I do it?
More specifically, If I want to git mv the following files
fileA.css.scss
fileB.css.scss
...
to
fileA.scss
fileA.scss
...
How would you do it?
I would write something like:
(Note: I’m not sure of the right arguments for
git mv, so I just demonstrated usingmv, I hope that’s O.K.)For information on the
${parameter%word}notation, see §3.5.3 Shell Parameter Expansion in the Bash Reference Manual.