diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2010-09-28 23:53:59 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2010-09-28 23:53:59 -0700 |
commit | 899ee539c5578b1f2fcbb34df2bb245ac90fbb38 (patch) | |
tree | 23d1043d7f1992e9eea92d15157f1cd441556195 /lognotify.rb | |
parent | 09b2bb28fb799668fa54a0a6b3b3ecffe7b6376b (diff) | |
download | lognotify-899ee539c5578b1f2fcbb34df2bb245ac90fbb38.tar.gz lognotify-899ee539c5578b1f2fcbb34df2bb245ac90fbb38.tar.xz |
Ruby allows us to write pretty if statements.
Diffstat (limited to 'lognotify.rb')
-rwxr-xr-x | lognotify.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |