From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24450 Path: news.gmane.org!not-for-mail From: David Arnold Newsgroups: gmane.comp.tex.context Subject: Re: sed question Date: Sun, 18 Dec 2005 11:14:07 -0800 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1134933391 4665 80.91.229.2 (18 Dec 2005 19:16:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 18 Dec 2005 19:16:31 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sun Dec 18 20:16:29 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1Eo40F-0006qa-W3 for gctc-ntg-context-518@m.gmane.org; Sun, 18 Dec 2005 20:15:28 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8F63012814; Sun, 18 Dec 2005 20:15:27 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 18746-09-3; Sun, 18 Dec 2005 20:15:23 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7571412827; Sun, 18 Dec 2005 20:15:23 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7FF7112827 for ; Sun, 18 Dec 2005 20:15:22 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 18746-09-2 for ; Sun, 18 Dec 2005 20:15:20 +0100 (CET) Original-Received: from fed1rmmtao05.cox.net (fed1rmmtao05.cox.net [68.230.241.34]) by ronja.ntg.nl (Postfix) with ESMTP id 4DB6912814 for ; Sun, 18 Dec 2005 20:15:19 +0100 (CET) Original-Received: from [10.0.1.2] (really [70.191.56.23]) by fed1rmmtao05.cox.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20051218191349.GTOJ17838.fed1rmmtao05.cox.net@[10.0.1.2]> for ; Sun, 18 Dec 2005 14:13:49 -0500 In-Reply-To: Original-To: mailing list for ConTeXt users X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:24450 Archived-At: 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