IntermediateAlgebraText $ find . -name "*.tex" | xargs sed -i '/% output=pdf/d' sed: 1: "./book.tex": invalid command code . MacOSX Tiger On Dec 18, 2005, at 11:05 AM, VnPenguin wrote:
On 12/18/05, David Arnold
wrote: All,
How would I use sed to erase %output=pdf from any file ending with .tex in the current directory and any subdirectories below it?
Delete the line containing %output=pdf:
$ find . -name "*.tex" | xargs sed -i '/%output=pdf/d'
Remove only text "output=pdf":
$ find . -name "*.tex" | xargs sed -i 's/%output=pdf/%/'
Try it with a test file before run over all your TeX files :)
HTH,
-- http://vnoss.org Vietnamese Open Source Software Community _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context