Are those caused by empty lines in the file your are iterating?
If so, you can try and add a
next if line.empty?
early in your log.each_line loop.
HTH,
Felix
On 11/25/2014 04:28 PM, Spriya wrote:
> Hi,
>
> I am trying to capture all paths in a text file. for that i am splitting
> the string i
Hi,
I am trying to capture all paths in a text file. for that i am splitting
the string into an array and the word with /java to get the paths.
Here is my ruby code
*logfile = "/home/weblogic/javaapp.txt"*
*log = Facter::Util::FileRead.read(logfile)*
*log.each_line do |line|*
*unless log.nil?