ZSH-oneliners

Move all files from .tex.bak to .tex; ZSH specific:

man zshexpn, HISTORY EXPANSION, modifiers

for a in ./*/.bak; do mv $a ${a:h}/${a:t:gs/.bak//}; done

Replace all .\@ with \@. in every tex file, recursivly.

gsed -i.bak -E ‘s/.\@/\@./g’ */.tex

Use backreferences to replace \@.[A-Z] with \@. [A-Z].

gsed -i.bak2 -E ‘s/\@.([A-Z])/\@. \1/g’ */.tex