Created
June 19, 2023 14:03
-
-
Save earnhardt3rd/097b0ad35a7d370c43da20022390b605 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'getopts.pl'; | |
| Getopts('m:d:t'); | |
| my $MODE = uc($opt_m) || ""; | |
| my $DEBUG = $opt_d || 0; | |
| if (defined $opt_t) { my %TEST = &_SHOW_HELP();} | |
| 1; | |
| sub _SHOW_HELP { | |
| my $inFile = shift || ""; | |
| if (scalar(keys %TOOLHELP) > 0) { | |
| print " ********************\n"; | |
| print " ** Available Help **\n"; | |
| print " ********************\n"; | |
| foreach my $thkey(sort keys %TOOLHELP) { | |
| if ($USER_ACCESS =~ /ADMIN/) { | |
| print " $thkey -h\n"; | |
| } else { | |
| print " DEBUG:\$TOOLS{$thkey} = " . $TOOLS{$thkey} . "\n" if $DEBUG > 1; | |
| if (exists($TOOLS{$thkey})) { | |
| my @TA = split(',',$TOOLS{$thkey}); | |
| if (scalar(@TA) > 0) { | |
| if (exists($TA[2])) { | |
| if ($USER_ACCESS =~ /$TA[2]/) { | |
| print " $thkey -h\n"; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } else { | |
| print " ** There is no Help! **\n"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment