Matthias Teege
2010-01-24 09:47:34 UTC
Hello,
I try to use a org-mode table as input to an shell script. It works, if
I use a Table with one column.
#+tblname: sec
| Hello World |
#+begin_src sh :var table=sec
cat <<EOF
$table
EOF
#+end_src
#+results:
: [[Hello World]]
But if I use more then one column, If got an error:
#+tblname: sec
| Hello | World |
#+begin_src sh :var table=sec
cat <<EOF
$table
EOF
#+end_src
#+results:
| sh: Zeile 1: World]]: command not found. |
It looks like, then Shell interprets the seperator "|" as pipe.
How do I use a multicolumn table as input for a shell script?
Many thanks
Matthias
I try to use a org-mode table as input to an shell script. It works, if
I use a Table with one column.
#+tblname: sec
| Hello World |
#+begin_src sh :var table=sec
cat <<EOF
$table
EOF
#+end_src
#+results:
: [[Hello World]]
But if I use more then one column, If got an error:
#+tblname: sec
| Hello | World |
#+begin_src sh :var table=sec
cat <<EOF
$table
EOF
#+end_src
#+results:
| sh: Zeile 1: World]]: command not found. |
It looks like, then Shell interprets the seperator "|" as pipe.
How do I use a multicolumn table as input for a shell script?
Many thanks
Matthias