aboutsummaryrefslogtreecommitdiff
path: root/contrib/urlize.pl
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/urlize.pl')
-rw-r--r--contrib/urlize.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/urlize.pl b/contrib/urlize.pl
new file mode 100644
index 00000000..8bb591f2
--- /dev/null
+++ b/contrib/urlize.pl
@@ -0,0 +1,16 @@
+#!/usr/bin/perl
+#
+# urlize.pl
+# jcw, 5/12/00
+#
+# A wrapper around Nagios plugins that provides a URL link in the output
+#
+
+($#ARGV < 1) && die "Incorrect arguments";
+my $url = shift;
+
+chomp ($result = `@ARGV`);
+print "<A HREF=\"$url\">$result</A>\n";
+
+# exit with same exit value as the child produced
+exit ($? >> 8);