urlize.pl 320 B

12345678910111213141516
  1. #!/usr/bin/perl
  2. #
  3. # urlize.pl
  4. # jcw, 5/12/00
  5. #
  6. # A wrapper around Nagios plugins that provides a URL link in the output
  7. #
  8. ($#ARGV < 1) && die "Incorrect arguments";
  9. my $url = shift;
  10. chomp ($result = `@ARGV`);
  11. print "<A HREF=\"$url\">$result</A>\n";
  12. # exit with same exit value as the child produced
  13. exit ($? >> 8);