#!/usr/bin/perl die Usage: ldap-group [-p] trans \n" unless @ARGV; for my $arg(@ARGV) { die "Invalid $arg\n" unless $arg =~ m/^[A-Za-z]+$/; } exec("/opt/bin/techweb-changes.pl",@ARGV); #### #include /* * Match string against the extended regular expression in * pattern, treating errors as no match. * * return 1 for match, 0 for no match */ int match(const char *string, char *pattern) { int status; regex_t re; if (regcomp(&re, pattern, REG_EXTENDED|REG_NOSUB) != 0) { return(0); /* report error */ } status = regexec(&re, string, (size_t) 0, NULL, 0); regfree(&re); if (status != 0) { return(0); /* report error */ } return(1); }