From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cc1e5a80c87c0755 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-23 07:37:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Running external program, getting output Date: Sun, 22 Jun 2003 19:20:53 +0200 Organization: AdaCL Message-ID: <5972474.ITsLBhBNCF@linux1.krischik.com> References: Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1056378964 03 11402 rFcLVvyTT1AmYd 030623 14:36:04 X-Complaints-To: usenet-abuse@t-online.de X-ID: TlJwP4ZJgen1RDqYjMzP47crCwhlZo36jf9FJE7kuGneoPtQkYKQEV User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:39604 Date: 2003-06-22T19:20:53+02:00 List-Id: Jarle Thorsen wrote: > As far as I have gathered the best way of (non OS-specific) running an > external program from Ada is using the Spawn procedure in g-os_lib, > correct ? > > But how do I get the output from the command that I run? Lets say that I > want to run "ls" for example..... AdaCL has a support class do just this. See TestCommand (test 3) on how to do it: http://adacl.sourceforge.net/html/TestCommand-Main__adb.htm You find AdaCL at: http://www.ada.krischik.com Also, you can use the GNAT.Expect package. With Regads Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com