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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ce7e6cb0bec07cff,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-06 07:40:24 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!fr.usenet-edu.net!usenet-edu.net!jussieu.fr!cnam.fr!not-for-mail From: evangeli Newsgroups: comp.lang.ada Subject: retrieve command result Date: Wed, 06 Nov 2002 17:43:46 +0100 Organization: Conservatoire National des Arts et Metiers Message-ID: <3DC946C2.3000505@cnam.fr> NNTP-Posting-Host: lmi14.cnam.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: kelvin.cnam.fr 1036597164 3062 163.173.228.14 (6 Nov 2002 15:39:24 GMT) X-Complaints-To: usenet@news.cnam.fr NNTP-Posting-Date: 6 Nov 2002 15:39:24 GMT User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011126 Netscape6/6.2.1 X-Accept-Language: en-us Xref: archiver1.google.com comp.lang.ada:30463 Date: 2002-11-06T15:39:24+00:00 List-Id: hi all is it possible to retrieve the result of a command in a variable. i explain myself: ------------------------------------------------------------------ with GNAT.OS_Lib; with Ada.Strings.Unbounded; procedure Test is ... my_string : Ada.Strings.Unbounded.unbounded_string; ... begin ... GNAT.OS_Lib.Spawn("ls", ...); -- I WOULD LIKE TO GET IN my_string THE RESULT OF THE ls COMMAND ... end; ------------------------------------------------------------------ i am under linux with gnat 3.13p. thanks for any help