From 899ee539c5578b1f2fcbb34df2bb245ac90fbb38 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Tue, 28 Sep 2010 23:53:59 -0700 Subject: Ruby allows us to write pretty if statements. --- lognotify.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lognotify.rb') diff --git a/lognotify.rb b/lognotify.rb index 8ab9aa9..0f05bc9 100755 --- a/lognotify.rb +++ b/lognotify.rb @@ -74,7 +74,7 @@ end # Retrieve new lines via SSH. def retrieve_lines conf, lines command = "cat #{conf[:path]}" - command << " | sed '1,#{lines}d'" if lines > 0 + command << " | sed '1,#{lines}d'" unless lines.zero? return %x[ssh #{conf[:hostname]} "#{command}"] end -- cgit v1.2.3-70-g09d2