0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-15 23:16:27 +00:00
org-mode/testing/examples/ob-awk-test.org
Eric Schulte c3e497f394 awk code blocks handle tabular input
Protected by a new unit test.

* lisp/ob-awk.el (org-babel-execute:awk): Use the
  `org-babel-awk-var-to-awk' function instead of a simple format
  string.
2014-06-07 11:16:55 -04:00

827 B

a collection of examples for ob-awk tests

Simple tests

Run without input stream

  BEGIN {
      print 42
  }

Use a code block ouput as an input

  {
      print 42+$1
  }

Use input file

    $0~/[\t]*#/{
        # skip comments 
        next
    }
    { 
        print $1*10
    }
a b c
  BEGIN{ print a; }

Input data generators

A code block to generate input stream

(print "1")