From: Robert Klemme Date: 2012-11-07T07:39:07+09:00 Subject: Re: putting values in one lines --f46d042f95642fe1fa04cddb441e Content-Type: text/plain; charset=ISO-8859-1 On Tue, Nov 6, 2012 at 11:21 PM, Ferdous ara wrote: > Hi, > Dont know how to explain this. > > example , i am doing this > > output=`cat #{file} | grep "up down" | grep "aenet" | awk '{print > $6}'` > puts output > > > So i get this > ae40.0 > ae30.0 > > But i want to output like ae40.0 ae30.0 > > how can i achieve this ?? > First I'd start by not using shell tools for this in a Ruby script (and btw. the cat is useless). Then we'd need to know the input to come up with suggestions. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ --f46d042f95642fe1fa04cddb441e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


On Tue, N= ov 6, 2012 at 11:21 PM, Ferdous ara <lists@ruby-forum.com> wrote:
Hi,
Dont know how to explain this.

example , i am doing this

output=3D`cat #{file} | grep =A0"up =A0 =A0down" | grep "aen= et" | awk '{print
$6}'`
puts output


So i get this
ae40.0
ae30.0

But i want to output like ae40.0 ae30.0

how can i achieve this ??

First I'd start by not using shell = tools for this in a Ruby script (and btw. the cat is useless).=A0 Then we&#= 39;d need to know the input to come up with suggestions.

Cheers

robert

--
remember.guy do |as, often| as.you_can= - without end
http://blo= g.rubybestpractices.com/
--f46d042f95642fe1fa04cddb441e--