From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Oliver_Ve=C4=8Dern=C3=ADk?= Subject: Re: filter included files Date: Sat, 11 May 2013 17:29:30 +0200 Message-ID: <87y5blbkmd.fsf@kerstf.org> References: <518DDD83.8020404@vecernik.at> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbBjy-0000vH-Ij for emacs-orgmode@gnu.org; Sat, 11 May 2013 11:29:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UbBjx-0005N9-Rj for emacs-orgmode@gnu.org; Sat, 11 May 2013 11:29:42 -0400 Received: from plane.gmane.org ([80.91.229.3]:53461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbBjx-0005N4-Ks for emacs-orgmode@gnu.org; Sat, 11 May 2013 11:29:41 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UbBjx-0002O4-0L for emacs-orgmode@gnu.org; Sat, 11 May 2013 17:29:41 +0200 Received: from 77.116.140.100.wireless.dyn.drei.com ([77.116.140.100]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 11 May 2013 17:29:41 +0200 Received: from ov by 77.116.140.100.wireless.dyn.drei.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 11 May 2013 17:29:41 +0200 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: emacs-orgmode@gnu.org > I like to include files from the network to document their status at the > time of publication e.g.: > > #+INCLUDE: "/:/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 cat /etc/iptables/iptables.rules | sed 's/pattern/string/' #+END_SRC -- Regards, Oliver