Function: org-babel-awk-var-to-awk

org-babel-awk-var-to-awk is a byte-compiled function defined in ob-awk.el.gz.

Signature

(org-babel-awk-var-to-awk VAR &optional SEP)

Documentation

Return a printed value of VAR suitable for parsing with awk.

SEP, when non-nil is a separator used when converting list values to awk table.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-awk.el.gz
(defun org-babel-awk-var-to-awk (var &optional sep)
  "Return a printed value of VAR suitable for parsing with awk.
SEP, when non-nil is a separator used when converting list values to awk
table."
  (let ((echo-var (lambda (v) (if (stringp v) v (format "%S" v)))))
    (cond
     ((and (listp var) (listp (car var)))
      (orgtbl-to-generic
       var
       (list :sep (or sep "\t")
             :fmt echo-var
             :with-special-rows nil)))
     ((listp var)
      (mapconcat echo-var var "\n"))
     (t (funcall echo-var var)))))