Rev 2 | Rev 20 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
#! /usr/bin/perl -w
# set of libraries to be used by these modules
# clean up the output of a command. Removes delimiter from text
sub cleanUp {
my ($delimiter, $text) = @_;
chomp $text;
return $text unless $delimiter;
$text =~ m/[^$delimiter]*$delimiter\s*(.*)/;
return $1;
}
# checks if a command is valid on this system. If so, returns the full path to it
# else, returns empty string.
sub validCommandOnSystem {
my $command = shift;
$command = `which $command 2> /dev/null`;
chomp $command;
return -x $command ? $command : '';
}
1;
Generated by GNU Enscript 1.6.5.90.