|
From: | sergio ruiz |
Subject: | [org-babel] String interpolation using shell |
Date: | Thu, 9 Jan 2020 11:56:19 -0500 |
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 #+END_SRC #+RESULTS: url_name #+BEGIN_SRC ruby :var url_input=url_name url_input #+END_SRC #+RESULTS: ^^ This seems to work fine. #+BEGIN_SRC shell :var url_input=url_name curl url_input #+END_SRC #+RESULTS: ^^ This doesn't work. It is trying to use "url_input" in the curl command. #+BEGIN_SRC shell curl {url_input} #+END_SRC #+RESULTS: ^^ this doesn't work. It is trying to use "url_input" in the curl command. Thanks! ---- peace, sergio photographer, journalist, visionary Public Key: https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2 #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV https://sergio101.com http://www.codeandmusic.com http://www.twitter.com/sergio_101 http://www.facebook.com/sergio101 |
signature.asc
Description: Message signed with OpenPGP
[Prev in Thread] | Current Thread | [Next in Thread] |