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?
On 12/18/05, David Arnold
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
It "finds" ok, just something later goes wrong: IntermediateAlgebraText $ find . -name "*.tex" | xargs ./book.tex ./bookenv.tex ./chapter1/chapter1.tex ./chapter1/ section1.tex ./chapter1/section2.tex ./chapter1/section3.tex ./ chapter2/chapter2.tex ./chapter3/chapter3.tex ./chapter3/junk.tex ./ chapter3/section1.tex ./chapter3/section2.tex ./chapter3/ section3.tex ./chapter3/section4.tex ./chapter3/section5.tex ./ chapter4/chapter4.tex ./chapter5/chapter5.tex ./chapter6/ chapter6.tex ./chapter7/chapter7.tex ./chapter8/chapter8.tex Aha! Got it! Needs the switch -e. IntermediateAlgebraText $ find . -name "*.tex" | xargs sed -i -e '/% output=pdf/d' On Dec 18, 2005, at 11:34 AM, Taco Hoekwater wrote:
participants (4)
-
David Arnold
-
Radhelorn
-
Taco Hoekwater
-
VnPenguin