> * List all files in dir (version of Seb)
>
> Just to show, this code prints a semi-colon after every filename.
>
> #+srcname: graph-files-seb2
> #+begin_src sh :results vector :var dir=graph-dir
> find $dir -type f -print |\
> while read -r name
> do
> echo "\"${name##*/}\";"
> done
> #+end_src
>
> #+results: graph-files-seb2
> | dan | |
> | eric | |
> | other | |
> | "seb | vauban"; |
>
> In most cases, these have been eaten as well...
>
> Is it possible to circumvent this problem, and get my filenames (even those
> with spaces in them) in one column?
>
Hi Seb,
My first idea was to use the ":results list" header argument, to return
a simple list (rather than a table in which the last element has two
columns)
#+begin_src sh :results list
echo "eric schulte"
echo "dan davison"
echo "seb vauban"
#+end_src
#+results:
- ("eric" "schulte")
- ("dan" "davison")
- ("seb" "vauban")
But that didn't work out quite as well as expected. Perhaps list
results should be made "smarter" by concatenating list elements that
happen to be lists themselves into strings...
I then tried the following, which should work, enabling you to split the
raw results on newline in subsequent code blocks. Note this approach
will also preserve things like ";"'s which may have been eaten by org
table import.
#+begin_src sh :results scalar
echo "eric schulte"
echo "dan davison"
echo "seb vauban"
#+end_src
#+results:
: eric schulte
: dan davison
: seb vauban
Hope this helps -- Eric
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-orgmode