Gabriel Laskar wrote: > On Thu, Nov 20, 2008 at 3:06 PM, Vamsi Krishna > <[EMAIL PROTECTED]> wrote: >> >> but today_count returns 'true' instead of count. > normal, system() return true or false only, not stdout... > > you can use ``, popen, or code that in ruby. > > today_count = File.open('oct_10.txt').grep('time').grep('hi').size > > (not tested) > -- > Gabriel Laskar <[EMAIL PROTECTED]>
Thanks all of you for the reply. --vamsi krishna. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---