[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] filter included files
From: |
Oliver Večerník |
Subject: |
Re: [O] filter included files |
Date: |
Sat, 11 May 2013 17:29:30 +0200 |
> 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