On Tue, Nov 6, 2012 at 11:21 PM, Ferdous ara <[email protected]> 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/
-- You received this message because you are subscribed to the Google Groups
ruby-talk-google group. To post to this group, send email to
[email protected]. To unsubscribe from this group, send email
to [email protected]. For more options, visit this
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en