From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: A quick way to empty contents of entries? Date: Fri, 4 Nov 2011 08:55:53 +0100 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMEd6-0000g5-S2 for emacs-orgmode@gnu.org; Fri, 04 Nov 2011 03:56:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RMEd5-0006PS-OR for emacs-orgmode@gnu.org; Fri, 04 Nov 2011 03:56:00 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:48572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMEd5-0006PN-K2 for emacs-orgmode@gnu.org; Fri, 04 Nov 2011 03:55:59 -0400 Received: by eye4 with SMTP id 4so2065966eye.0 for ; Fri, 04 Nov 2011 00:55:57 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: gylns Cc: emacs-orgmode@gnu.org On Nov 4, 2011, at 7:56 AM, gylns wrote: > Hi, all > I want to empty all my contents but leave only with the headlines and = the > properties, is there a fast way? Make backup copies before you try this.... For one file: perl -ne 'print if /^\*+ / or /^\s*:PROPERTIES:\s*$/../^\s*:END:\s*$/' = old.org > stripped.org For a bunch of files, with .bak backup copies perl -ni.bak -e 'print if /^\*+ / or = /^\s*:PROPERTIES:\s*$/../^\s*:END:\s*$/' *.org HTH - Carsten=