emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Oliver Večerník" <ov@vecernik.at>
To: emacs-orgmode@gnu.org
Subject: Re: filter included files
Date: Sat, 11 May 2013 17:29:30 +0200	[thread overview]
Message-ID: <87y5blbkmd.fsf@kerstf.org> (raw)
In-Reply-To: 518DDD83.8020404@vecernik.at

> I like to include files from the network to document their status at the
> time of publication e.g.:
>
>   #+INCLUDE: "/<host>:/etc/iptables/iptables.rules" example
>
> But sometimes I'd like to do some more filtering (sed, whatever), to
> remove passwords or other sensible information from the output.  Is
> their a 'best practice' to achieve this goal?

To answer my own question, I still don't know if this is 'best
practice', but this worked for me quite well:

#+BEGIN_SRC sh :exports results :results output
ssh <host> cat /etc/iptables/iptables.rules | sed 's/pattern/string/'
#+END_SRC

-- 
Regards,
Oliver

  reply	other threads:[~2013-05-11 15:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-11  5:56 filter included files Oliver Večerník
2013-05-11 15:29 ` Oliver Večerník [this message]
2013-05-11 16:12   ` Oliver Večerník

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=87y5blbkmd.fsf@kerstf.org \
    --to=ov@vecernik.at \
    --cc=emacs-orgmode@gnu.org \
    /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).