create-user.pl created. added globbing

This commit is contained in:
gashapwn 2020-11-24 19:51:43 +00:00
parent b9d762dfe9
commit 0ae11d062b
2 changed files with 23 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
venv/*
test/*
*~
test_*.txt

View File

@ -0,0 +1,22 @@
#!/usr/bin/perl
use warnings;
use strict;
my $WORKING_DIR = "/home/gashapwn/lyadmin/";
my $ACCOUNT_DIR = "test/";
my $FULL_PATH = "$WORKING_DIR$ACCOUNT_DIR";
my @g;
die "test 0";
@g = glob("$FULL_PATH*");
@g = map { s/.*\/([^\/]*).pub$/$1/; $_ } grep {$_ =~ /pub$/} @g;
for my $fn (@g){
printf("%s\n", $fn);
}