Re: Handling conversion of fields with spaces to tables

2021-12-07 Thread Eric S Fraga
On Tuesday,  7 Dec 2021 at 08:09, Loris Bennett wrote:
> However, I can just pipe the output through 'sed' to get one at the
> beginning, so all is well.

Excellent!  sed is one of the most underrated tools in our arsenal and
actually highlights the great thing about org being all about text.

-- 
: Eric S Fraga, with org release_9.5.1-243-gad53c5 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: Handling conversion of fields with spaces to tables

2021-12-06 Thread Loris Bennett
Eric S Fraga  writes:

> On Monday,  6 Dec 2021 at 15:43, Loris Bennett wrote:
>> That's solves the problem of the field being split, but gives me the new
>> problem that the output is no longer a table :-)
>
> Ah, yes, sorry: you need to have each line of the output start with a
> "|" as well.  If your external script can do that, it should work.
>
> As in:
>
>   #+BEGIN_SRC sh :results output raw
>   echo "|marie|Curie|123"
>   echo "|louis|De Broglie|456"
>   #+END_SRC
>
>   #+RESULTS:
>   | marie | Curie  | 123 |
>   | louis | De Broglie | 456 |

For what ever reason, the external script has an option to add "|" at
the end of each line, but not at the beginning.  However, I can just
pipe the output through 'sed' to get one at the beginning, so all is
well.

Thanks for the help!

Cheers,

Loris
-- 
This signature is currently under construction.



Re: Handling conversion of fields with spaces to tables

2021-12-06 Thread Eric S Fraga
On Monday,  6 Dec 2021 at 15:43, Loris Bennett wrote:
> That's solves the problem of the field being split, but gives me the new
> problem that the output is no longer a table :-)

Ah, yes, sorry: you need to have each line of the output start with a
"|" as well.  If your external script can do that, it should work.

As in:

  #+BEGIN_SRC sh :results output raw
  echo "|marie|Curie|123"
  echo "|louis|De Broglie|456"
  #+END_SRC

  #+RESULTS:
  | marie | Curie  | 123 |
  | louis | De Broglie | 456 |

-- 
: Eric S Fraga, with org release_9.5.1-243-gad53c5 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: Handling conversion of fields with spaces to tables

2021-12-06 Thread Loris Bennett
Hi Eric,

Eric S Fraga  writes:

> This might work for you:
>
>   #+BEGIN_SRC sh :results output raw

That's solves the problem of the field being split, but gives me the new
problem that the output is no longer a table :-)

To elaborate: My goal is to combine this output with data from another
table to create a third table.

Cheers,

Loris

-- 
This signature is currently under construction.



Re: Handling conversion of fields with spaces to tables

2021-12-06 Thread Eric S Fraga
This might work for you:

  #+BEGIN_SRC sh :results output raw


-- 
: Eric S Fraga, with org release_9.5.1-243-gad53c5 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096