[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [FR] ob-awk.el specifying a delimeter argument in for output
From: |
Jeremie Juste |
Subject: |
Re: [FR] ob-awk.el specifying a delimeter argument in for output |
Date: |
Mon, 06 Mar 2023 08:47:44 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) |
Hello Ihor,
>> I guess we might add an option to tell Org which separator to use when
>> parsing output when :results table header argument is provided (see 16.6
>> Results of Evaluation section of Org manual). However, you can achieve
>> the same now, using :post header argument, replacing the separators with
>> something Org can understand.
Thanks again for the suggestion, after giving your solution more thoughts, I
could
achieve the desired output.
# file test.csv
# 123;0;123
#+NAME: specific-delim
#+BEGIN_SRC emacs-lisp :var tbl="" delim=";"
(format "|%s" (replace-regexp-in-string delim "|" tbl))
#+end_src
#+RESULTS: specific-delim
: |
#+begin_src awk :in-file test.csv :cmd-line -F ";" :post
specific-delim(*this*,";") :results raw
{print $0}
#+end_src
#+RESULTS:
| 123 | 0 | 123 |
Best regards,
Jeremie