From mboxrd@z Thu Jan 1 00:00:00 1970 From: "numbchild@gmail.com" Subject: use a src block's result as input of another src block report error: the input device is not a TTY Date: Tue, 19 Dec 2017 20:59:19 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113d5448c9233a0560b10a6b" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRHUu-0001bE-Gx for emacs-orgmode@gnu.org; Tue, 19 Dec 2017 07:59:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRHUt-0002Md-DP for emacs-orgmode@gnu.org; Tue, 19 Dec 2017 07:59:52 -0500 Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:45524) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eRHUt-0002M1-5Y for emacs-orgmode@gnu.org; Tue, 19 Dec 2017 07:59:51 -0500 Received: by mail-oi0-x22e.google.com with SMTP id x20so12296092oix.12 for ; Tue, 19 Dec 2017 04:59:50 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org-mode --001a113d5448c9233a0560b10a6b Content-Type: text/plain; charset="UTF-8" Here is my example: #+NAME: get-container-name #+begin_src shell :results output echo $(docker ps --format="{{.Names}}") #+end_src #+RESULTS: get-container-name : elastic_thompson #+begin_src shell :var container_name=get-container-name :noweb yes docker exec -it $container_name pwd # docker exec -it <> pwd #+end_src #+RESULTS: But I got error: #+begin_example the input device is not a TTY #+end_example [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 Blog: http://stardiviner.github.io/ --001a113d5448c9233a0560b10a6b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Here is my example:

#+NAME: get-container-n= ame
#+begin_src shell :results output
echo $(docker ps --format=3D&qu= ot;{{.Names}}")
#+end_src

#+RESULTS: get-container-name
:= elastic_thompson

#+begin_src shell :var container_name=3Dget-contai= ner-name :noweb yes
docker exec -it $container_name pwd
# docker exec= -it <<get-container-name>> pwd
#+end_src

#+RESULTS:<= br>
But I got error:

#+begin_example
the input device is not a= TTY
#+end_example


[stardiviner]= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <Hack this = world!>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 GPG key ID: 47C32433
IRC(freeen= ode): stardiviner =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Twitter:=C2=A0 @n= umbchild
Key fingerprint =3D 9BAA 92BC CDDD B9EF 3B36=C2=A0 CB99 B8C4 B8= E5 47C3 2433
Blog: http://stardiviner.github.io/
--001a113d5448c9233a0560b10a6b--