From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Bart Bunting" Subject: Some advice on how to use babel to generate cisco configs Date: Thu, 31 Jan 2013 09:24:11 +1100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0g4k-0005xR-Rb for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 17:24:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0g4j-0001cT-Rr for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 17:24:14 -0500 Received: from that.urnet.com.au ([203.7.149.1]:53230 helo=bit.local) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0g4j-0001c5-GK for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 17:24:13 -0500 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 Good morning, I have been trying to figure out without much luck how to use babel to generate some cisco configs. What I would like to achieve is to have a table containing a few values, e.g. ip address vlan number etc. Then have a cisco config in the org file with markers where the substitutions are to be inserted. Run through the table and create a node in the org file one for each row of the table. The end result should be a set of cisco configs with the substitutions made. I was hoping to also use shell to call pwgen to generate a random password to insert. Hope that ramble made some sort of sence. Can someone give me some ideas on how to put this together? I tried to use an org source block and a shell function to parse it. I couldn't quite tie together how to get the output to work correctly or how to be able to parse each line.... Kind regards Bart -- Kind regards Bart