all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* filter included files
@ 2013-05-11  5:56 Oliver Večerník
  2013-05-11 15:29 ` Oliver Večerník
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Večerník @ 2013-05-11  5:56 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

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?

-- 
Regards,
Oliver

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: filter included files
  2013-05-11  5:56 filter included files Oliver Večerník
@ 2013-05-11 15:29 ` Oliver Večerník
  2013-05-11 16:12   ` Oliver Večerník
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Večerník @ 2013-05-11 15:29 UTC (permalink / raw)
  To: emacs-orgmode

> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: filter included files
  2013-05-11 15:29 ` Oliver Večerník
@ 2013-05-11 16:12   ` Oliver Večerník
  0 siblings, 0 replies; 3+ messages in thread
From: Oliver Večerník @ 2013-05-11 16:12 UTC (permalink / raw)
  To: emacs-orgmode

> 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

oops, useless use of cat:

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-11 16:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-11  5:56 filter included files Oliver Večerník
2013-05-11 15:29 ` Oliver Večerník
2013-05-11 16:12   ` Oliver Večerník

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.