Re: processing a literal example line by line in a shell source block?

2022-11-06 Thread Greg Minshall
Ihor, again, thanks for helping me with that problem. and, just for my (or anyone's) future reference, how i probably *should* have debugged this was to tangle the relevant source block, and then examine the resulting shell-script file, and gone from there. cheers, Greg

Re: processing a literal example line by line in a shell source block?

2022-11-03 Thread Max Nikulin
On 03/11/2022 01:17, Greg Minshall wrote: hi. i have a text in a named #+begin_example ... #+end_example block. i would like to process this text line by line in a shell (bash, say) code block. but, it appears that the individual lines are not separated, but passed as one long string to the sou

Re: processing a literal example line by line in a shell source block?

2022-11-03 Thread Greg Minshall
Ihor, > Try > > #+name: lbl > #+begin_example > line 1 > line 2 > #+end_example > > #+begin_src bash :var input=lbl :results output > echo "${input}" > #+end_src ah, the double quotes! thanks very much! cheers, Greg

Re: processing a literal example line by line in a shell source block?

2022-11-03 Thread Ihor Radchenko
Greg Minshall writes: > hi. i have a text in a named #+begin_example ... #+end_example block. > i would like to process this text line by line in a shell (bash, say) > code block. but, it appears that the individual lines are not > separated, but passed as one long string to the source block.

processing a literal example line by line in a shell source block?

2022-11-02 Thread Greg Minshall
hi. i have a text in a named #+begin_example ... #+end_example block. i would like to process this text line by line in a shell (bash, say) code block. but, it appears that the individual lines are not separated, but passed as one long string to the source block. (example below.) is there a mag