Skip to content

Instantly share code, notes, and snippets.

@earnhardt3rd
Created June 19, 2023 14:04
Show Gist options
  • Save earnhardt3rd/50894b944feba646f7ea4e387710c46f to your computer and use it in GitHub Desktop.
Save earnhardt3rd/50894b944feba646f7ea4e387710c46f to your computer and use it in GitHub Desktop.
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &_zDEL_USERS_OLD_SEE_FH_USERS();}
1;
sub _zDEL_USERS_OLD_SEE_FH_USERS {
my $input = shift || "";
print " _USERS($input)\n" if $DEBUG > 0;
if (uc($input) eq "NOW") {$input = &getDate() . "-" . &getTime();}
if (uc($input) eq "DT") {$input = &getDate();}
if (uc($input) eq "TM") {$input = &getTime();}
my %FILE_HAG;
my $newFlag=0;
if (! -f $pdmUsersFile) {
my $userMsg = " Hello, $USERNAME\n";
if (exists($ADM{lc($USERNAME)})) {
$userMsg .= " .pdm_users file did not exists, so I'm creating one for you! \n";
} else {
$userMsg .= " I'm sorry, but you this tool has not been setup correctly! \n";
if (scalar(keys %ADM) > 0) {
foreach my $akey(sort keys %ADM) {
$userMsg .= sprintf " Please see %-50s ~ %-s\n",$akey,$ADM{$akey};
}
}
}
&displayMessageInBox("$userMsg\n");
$newFlag++;
} else {
%FILE_HAG= &readHASH_File_WAGHAG($pdmUsersFile);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment