From: Phy Prabab Date: 2007-02-22T19:19:40+09:00 Subject: Re: ruby tail --0-1471312008-1172139576=:46771 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Wow thats really cool!!!=0A=0A----- Original Message ----=0AFrom: Alex Youn= g =0ATo: ruby-talk ML =0ASen= t: Thursday, February 22, 2007 1:59:39 AM=0ASubject: Re: ruby tail=0A=0AKev= in Jackson wrote:=0A>> Actually, I am not sure how this would work. If I d= o this, I get no =0A>> output from the file:=0A>>=0A>> `tail -f sim.out`=0A= >>=0A>> So there is something basic I am missing here. Any help?=0A> =0A> = it shells out to the process and waits for it to return - with -f does=0A> = tail ever return? if not you may not be able to use it - AFAIK ` and=0A> ex= ec are the same - someone with better ruby knowledge may be able to=0A> off= er a solution - perhaps using threads or something=0AUse IO.popen:=0A=0AIO.= popen('tail -f sim.out'){|f|=0A while line =3D f.gets=0A p line= =0A end=0A}=0A=0A-- =0AAlex=0A=0A=0A=0A=0A=0A=0A=0A=0A =0A______________= ______________________________________________________________________=0AAn= y questions? Get answers on any topic at www.Answers.yahoo.com. Try it now= . --0-1471312008-1172139576=:46771--