[2013-07-04] How to run a differnt shell command but with the same parameters

I had a script that modifies the docstrings from a python file. I use meld to pre check if all the changes are correct.

$ meld clientpackets.py{.new,}

But now I wanted to run the same line but replace just meld with mv. I found the solution at stackoverflow

$ !!:s/meld/mv/ mv clientpackets.py{.new,}