0

I want to change the command \pause into %\pause in all my tex files. So I used the following Linux command:

for f in *.tex; do sed -i 's/\pause/%\pause/g' $f; done

but the problem is that the machine don't take into account the character \, so it only changes pause into %pause.

Zanna
  • 3,571
ahmed
  • 1

1 Answers1

2

You should escape \ with \\:

for f in ./*.tex; do sed -i -e 's/\\pause/%&/g' "$f"; done
hschou
  • 2,910
  • 13
  • 15