summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 738e046)
raw | patch | inline | side by side (parent: 738e046)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 25 Mar 2008 18:31:37 +0000 (19:31 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Wed, 26 Mar 2008 08:37:16 +0000 (09:37 +0100) |
The regexes parsing the user input lines have been adopted to take into
account that the newline at the end of the line has been removed.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
account that the newline at the end of the line has been removed.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
contrib/cussh.pl | patch | blob | history |
diff --git a/contrib/cussh.pl b/contrib/cussh.pl
index df3df344aed962777d7b2e6eea085da82f390a5c..6da2856d0d8b307387788da48aff2da58cf6353d 100755 (executable)
--- a/contrib/cussh.pl
+++ b/contrib/cussh.pl
#!/usr/bin/perl
#
# collectd - contrib/cussh.pl
-# Copyright (C) 2007 Sebastian Harl
+# Copyright (C) 2007-2008 Sebastian Harl
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
last if ($line =~ m/^quit$/i);
- my ($cmd) = $line =~ m/^(\w+)\s+/;
+ my ($cmd) = $line =~ m/^(\w+)\s*/;
$line = $';
next if (! $cmd);
print $$string . $/;
my ($h, $p, $pi, $t, $ti) =
- $$string =~ m/^(\w+)\/(\w+)(?:-(\w+))?\/(\w+)(?:-(\w+))?\s+/;
+ $$string =~ m/^(\w+)\/(\w+)(?:-(\w+))?\/(\w+)(?:-(\w+))?\s*/;
$$string = $';
return if ((! $h) || (! $p) || (! $t));