Is there any best approach to formatting output of bash or shell code block as 
an org table whose first line is a header.

What I've tried:

#+begin_src bash :colnames yes :results output table 
echo "Name,Age"
echo "Alice,30"
echo "Bob,25"
#+end_src

#+RESULTS:
| Name  | Age |
| Alice |  30 |
| Bob   |  25 |

Granted the org doc does 
I would use :post to inject a 2nd line if I knew what to inject to have it be 
treated as separator between header and body of an org table

But I can't even figure that out.  I've tried a few variations on the following 
none of which work in my hands.

#+begin_src bash :colnames yes :hline yes  :results output table 
echo "Name,Age"
echo "-,-"
echo "Alice,30"
echo "Bob,25"
#+end_src

#+RESULTS:
| Name  | Age |
| -     |   - |
| Alice |  30 |
| Bob   |  25 |


It seems the issue has been raised and not completely addressed here:

http://eschulte.github.io/babel-dev/DONE-Handling-of-table-column-names-and-hlines-across-languages

I would really like an approach which constructs output to be true ORG table 
which I can then feed to other downstream org tools that work with org table.

Thanks!

~Malcolm

Reply via email to