Eric S Fraga writes: > Eric Schulte writes: > > [...] > >> As an example, I've worked up an very simple ob-awk.el file from >> ob-template.el, it is attached along with an example org-mode file which >> demonstrates its usage. > > Eric, > > this is great to see as I use awk quite often. What is involved in > extending this to be able to run an awk script on input from within the > org file (output of another babel block, for instance, as my typical use > of awk is to re-arrange output from another program...)? Or, if you > wish, can you suggest one of the ob-XXX modules that best illustrates > how to do this and I can give it a try? > I've made a quick change so that any variable named "stdin" is treated specially, in that, rather than using its value to replace strings of $stdin in the text of the awk code, the value of the stdin variable is saved into the file processed by awk. This allows awk to operate over Org-mode references. See the attached example file. If babel code block supported a pipe or an actual stdin header argument, that would be the ideal way to add this behavior, but currently nothing of that nature exists. Please let me know if this misses part of your suggestion, or more generally what else may be advisable before we add this to the core. Cheers -- Eric