Disable dynamic versionning for releases, and allow generating version out of subversion.
[monitoring-plugins.git] / contrib / urlize.pl
blob5acb52de8e522ff2c0979e606fdfafd06701af03
1 #!/usr/bin/perl
3 # urlize.pl
4 # jcw, 5/12/00
6 # A wrapper around Nagios plugins that provides a URL link in the output
9 # Pay close attention to quoting to ensure that the shell passes the
10 # expected data to the plugin. For example, in:
12 # urlize http://example.com/ check_http -H example.com -r 'two words'
14 # the shell will remove the single quotes and urlize will see:
16 # urlize http://example.com/ check_http -H example.com -r two words
18 # You probably want:
20 # urlize http://example.com/ \"check_http -H example.com -r 'two words'\"
22 ($#ARGV < 1) && die "Incorrect arguments";
23 my $url = shift;
25 chomp ($result = `@ARGV`);
26 print "<A HREF=\"$url\">$result</A>\n";
28 # exit with same exit value as the child produced
29 exit ($? >> 8);