Andrew Janke wrote:
Sure. I use this all the time for renaming bunches of tiles for example... [...] gordon:goo$ EDITOR=nedit vidir . (I have an alias for this as opposed to normally using vi) [...] First, a quick vertical select and delete or two gives me this. [...] Then select the "day" part and press <Ctrl>0 (6 times) [...] And the same for the "year" and press <Ctrl>9 (2 times).
Now Save, quit and grin. [...]
Um, that sounds like something more suited to a simple sed or awk script; something like this:
ls | sed -r -n 's/^([0-9]+.)([0-9]{2})-([0-9]{2})-([0-9]{4})(-.*.mnc)$/mv \1\2-\3-\4\5 \1\4\3\2\5/p' | sh
or something (probably cleaner if you use the hold buffer). If you do this a lot, it might be better to script it than to rely on editing it the same way each time.