Permalink
Browse files

Lines of file to parse

  • Loading branch information...
1 parent 20bdd72 commit 2f128849c96ef9138c03b7f7a361e35568b82bbb C. Flores committed Mar 17, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 log_knownerrors.rb
View
@@ -24,10 +24,11 @@
lines = ARGV[2]
if ( lines =~ /^\d+$/ )
lines = lines.to_i
-elsif ( lines == '' )
+elsif ( lines == '' || lines == nil )
lines = 100
else
puts "the optional third argument must be an integer!"
+ exit
end
@@ -38,7 +39,7 @@
logentries=`/usr/bin/tail -#{lines} #{file} |grep -e "#{warning}"`
if (logentries.size > 0)
- puts "status err bad entires for #{warning} in #{file}"
+ puts "status err bad entires for \"#{warning}\" in #{file}"
else
puts "status ok ok"
end

0 comments on commit 2f12884

Please sign in to comment.