emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: Greg Minshall <minshall@umich.edu>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: How to get a table into a variable in a shell code block?
Date: Sat, 03 Apr 2021 21:01:49 +0200	[thread overview]
Message-ID: <87y2dzchuq.fsf@posteo.net> (raw)
In-Reply-To: <700587.1617475549@apollo2.minshall.org> (Greg Minshall's message of "Sat, 03 Apr 2021 21:45:49 +0300")

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[@]}

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

Best regards,

Juan Manuel 

      parent reply	other threads:[~2021-04-03 19:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-03 18:14 How to get a table into a variable in a shell code block? William Denton
2021-04-03 18:45 ` Greg Minshall
2021-04-03 18:57   ` William Denton
2021-04-04  5:26     ` Michael Welle
2021-04-03 19:01   ` Juan Manuel Macías [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2dzchuq.fsf@posteo.net \
    --to=maciaschain@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=minshall@umich.edu \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).