emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get a table into a variable in a shell code block?


From: Juan Manuel Macías
Subject: Re: How to get a table into a variable in a shell code block?
Date: Sat, 03 Apr 2021 21:01:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

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 ${n[@]}
#+end_src

echo ${n[1]} returns the second element (two) of the list (0, returns
one and 2 returns three)

Best regards,

Juan Manuel 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]