From: Carsten Dominik <carsten.dominik@gmail.com>
To: gylns <glovepm@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: A quick way to empty contents of entries?
Date: Fri, 4 Nov 2011 08:55:53 +0100 [thread overview]
Message-ID: <B518F030-D6FE-451E-91EB-894DFB1AF4F1@gmail.com> (raw)
In-Reply-To: <loom.20111104T075328-923@post.gmane.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
next prev parent reply other threads:[~2011-11-04 7:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-04 6:56 A quick way to empty contents of entries? gylns
2011-11-04 7:55 ` Carsten Dominik [this message]
2011-11-04 8:56 ` gylns
2011-11-23 17:11 ` Memnon Anon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B518F030-D6FE-451E-91EB-894DFB1AF4F1@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=glovepm@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).