From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Jerram Subject: Re: 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 14:50:13 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----RZ79TJX92888S18VI278SDLISKAN2M" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRJDs-0003td-D8 for emacs-orgmode@gnu.org; Tue, 19 Dec 2017 09:50:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRJDo-00061W-Sv for emacs-orgmode@gnu.org; Tue, 19 Dec 2017 09:50:24 -0500 Received: from smtp-out-3.talktalk.net ([62.24.135.67]:13186) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eRJDo-0005xp-Md for emacs-orgmode@gnu.org; Tue, 19 Dec 2017 09:50:20 -0500 In-Reply-To: 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: emacs-orgmode@gnu.org, "numbchild@gmail.com" Org-mode ------RZ79TJX92888S18VI278SDLISKAN2M Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Remove the -it options, which I believe you don't need for executing a simp= le command like pwd=2E (-it is what you use to execute a shell or other interactive command in a = container, and requires there to be a tty=2E) Best wishes - Neil On 19 December 2017 12:59:19 GMT+00:00, "numbchild@gmail=2Ecom" wrote: >Here is my example: > >#+NAME: get-container-name >#+begin_src shell :results output >echo $(docker ps --format=3D"{{=2ENames}}") >#+end_src > >#+RESULTS: get-container-name >: elastic_thompson > >#+begin_src shell :var container_name=3Dget-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 =3D 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 >Blog: http://stardiviner=2Egithub=2Eio/ ------RZ79TJX92888S18VI278SDLISKAN2M Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Remove the -it options, which I believe you don= 9;t need for executing a simple command like pwd=2E

(-it is what you use to execute a shell or other interactive command in a = container, and requires there to be a tty=2E)

Best wishes - Neil


On 19 December 2017 12:59:19 GMT+00:00,= "numbchild@gmail=2Ecom" <numbchild@gmail=2Ecom> wrote:
Here is my example:

#+NAME: get-containe= r-name
#+begin_src shell :results output
echo $(docker ps --forma= t=3D"{{=2ENames}}")
#+end_src

#+RESULTS: get-cont= ainer-name
: elastic_thompson

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

#+RESULTS:

But I got error:

#+beg= in_example
the input device is not a TTY
#+end_example


[stardiviner]     = ;      <Hack this world!>   &= nbsp;  GPG key ID: 47C32433
IRC(freeenode): stardiviner  &nb= sp;            =       Twitter:  @numbchild
Key fingerpri= nt =3D 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: <= a href=3D"http://stardiviner=2Egithub=2Eio/" target=3D"_blank">http://stard= iviner=2Egithub=2Eio/
------RZ79TJX92888S18VI278SDLISKAN2M--