Often I want to exchange two folders like this:
$ mv a{,-alt-tmp}
$ mv a{-alt,}
$ mv a-alt{-tmp,}
i.e. the folder "a" becomes "a-alt" and "a-alt" becomes "a". Is there some bash command to accomplish this? There should be a minimal time gap between the two changes.
I could do something similar with
$ mv a{,-old} && mv a{-new,}
but this doesn't work with a real exchange of names, since one folder has an other name afterwards.