create-user.pl created. added globbing
This commit is contained in:
parent
b9d762dfe9
commit
0ae11d062b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
venv/*
|
venv/*
|
||||||
test/*
|
test/*
|
||||||
*~
|
*~
|
||||||
|
test_*.txt
|
||||||
|
22
perl-script/create-user.pl
Normal file
22
perl-script/create-user.pl
Normal 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);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user