emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [org-babel] String interpolation using shell
@ 2020-01-09 16:56 sergio ruiz
  2020-01-09 20:31 ` Mike Gauland
  0 siblings, 1 reply; 2+ messages in thread
From: sergio ruiz @ 2020-01-09 16:56 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1.1: Type: text/plain, Size: 1180 bytes --]

Hey, all.

I am trying to set a string at the head of the file and use it in different places in the file.

Everything works correctly for somethign like ruby, but I am not sure how do do this with a shell command.

Just sets the string to the url
#+NAME: url_name
#+BEGIN_SRC ruby

#+RESULTS: url_name
: http://www.google.com

#+BEGIN_SRC ruby :var url_input=url_name

: http://www.google.com

^^ This seems to work fine.

#+BEGIN_SRC shell :var url_input=url_name
  curl url_input


^^ This doesn't work. It is trying to use "url_input" in the curl command.

#+BEGIN_SRC shell
  curl {url_input}


^^ this doesn't work. It is trying to use "url_input" in the curl command.


photographer, journalist, visionary

Public Key: https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV

[-- Attachment #1.2: Type: text/html, Size: 4692 bytes --]

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-09 20:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 16:56 [org-babel] String interpolation using shell sergio ruiz
2020-01-09 20:31 ` Mike Gauland

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).