;;; ob-awk.el --- org-babel functions for awk evaluation
-;; Copyright (C) 2011 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2012 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org
-;; Version: 7.7
;; This file is part of GNU Emacs.
;;; Commentary:
;; Babel's awk can use special header argument:
-;;
+;;
;; - :in-file takes a path to a file of data to be processed by awk
-;;
+;;
;; - :stdin takes an Org-mode data or code block reference, the value
;; of which will be passed to the awk process through STDIN
"Expand BODY according to PARAMS, return the expanded body."
(dolist (pair (mapcar #'cdr (org-babel-get-header params :var)))
(setf body (replace-regexp-in-string
- (regexp-quote (concat "$" (car pair))) (cdr pair) body)))
+ (regexp-quote (format "$%s" (car pair))) (cdr pair) body)))
body)
(defun org-babel-execute:awk (body params)
(provide 'ob-awk)
-;; arch-tag: 844e2c88-6aad-4018-868d-a2df6bcdf68f
+
;;; ob-awk.el ends here