Hello,
William Denton writes:
> On 3 April 2021, Greg Minshall wrote:
>
>> #+begin_src shell :results output :var n=numbers
>> echo ${n[1]}
>> #+end_src
>
> Aha, it's in an array but I didn't see it! Thanks. Org was doing it magic
> but
> I got confused by bash.
interestingly I asked a simila
Hi Greg and William,
Greg Minshall writes:
> William,
>
> try
>
> #+begin_src shell :results output :var n=numbers
> echo ${n[1]}
> #+end_src
>
> cheers, Greg
I don't know if I'm saying something wrong, but wouldn't it be better
this way?:
#+begin_src shell :results output :var n=numbers
echo $
On 3 April 2021, Greg Minshall wrote:
#+begin_src shell :results output :var n=numbers
echo ${n[1]}
#+end_src
Aha, it's in an array but I didn't see it! Thanks. Org was doing it magic but
I got confused by bash.
#+NAME: numbers
| one |
| two |
| three |
#+begin_src shell :results out
William,
try
#+begin_src shell :results output :var n=numbers
echo ${n[1]}
#+end_src
cheers, Greg
Let's say I have a table like this:
#+NAME: numbers
| one |
| two |
| three |
I want to run through those numbers in a shell code block, but it I pass in
table as a variable, it only sees the first number.
#+begin_src shell :results output :var n=numbers
echo $n
#+end_src
#+RESULTS:
: on