From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA11919; Thu, 20 Dec 2001 16:14:34 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA11912 for ; Thu, 20 Dec 2001 16:14:33 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id fBKFEWn29127 for ; Thu, 20 Dec 2001 16:14:32 +0100 (MET) Received: (from fpottier@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA11685 for caml-list@inria.fr; Thu, 20 Dec 2001 16:14:32 +0100 (MET) Date: Thu, 20 Dec 2001 16:14:32 +0100 From: Francois Pottier To: caml-list@inria.fr Subject: Re: [Caml-list] Unix.create_process Message-ID: <20011220161432.A11820@pauillac.inria.fr> Reply-To: Francois.Pottier@inria.fr References: <3C20DDC9.22969.A60E35F@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 1.0i In-Reply-To: <3C20DDC9.22969.A60E35F@localhost>; from wester@ilt.fhg.de on Wed, Dec 19, 2001 at 06:34:49PM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi Rolf, You need to create a pipe, have the process write into one end of it, and read data off the other end. The function [Unix.open_process_in] does that for you. Here is an example: let one_liner command = let channel = Unix.open_process_in command in let line = input_line channel in let _ = Unix.close_process_in channel in line ;; -- François Pottier Francois.Pottier@inria.fr http://pauillac.inria.fr/~fpottier/ ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr