Hi Matthias, Sorry about the slow reply. This is a good question, I have comments in-line below.
Matthias Teege <matthias-...@mteege.de> writes: [...] > 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? > This is a good question, clearly the current approach of dumping it in as a string isn't working, however I'm not sure what a good alternative would be. Some ideas that come to mind are... 1) allowing the user to specify a separator with a header argument as follows #+begin_src sh :var table=sec :separator , cat <<EOF $table EOF #+end_src which would result in something like : "Hello, World" 2) writing the table to a tab or comma separated file and then replacing =$table= in the source block body with the path to the file name, s.t. something like #+begin_src sh :var table=data wc $table #+end_src would return reasonable results I guess this would largely depend on what types of values you are passing to the shell, and what your use-case is. I'd be interested to hear other people's feedback here as the "right" solution will be largely dependent on how people would actually be using tables in shell scripts. Thanks for bringing this up! -- Eric _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode