Browse Source

create-user.pl created. added globbing

tags/release-00
gashapwn 3 years ago
parent
commit
0ae11d062b
2 changed files with 23 additions and 0 deletions
  1. +1
    -0
      .gitignore
  2. +22
    -0
      perl-script/create-user.pl

+ 1
- 0
.gitignore View File

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

+ 22
- 0
perl-script/create-user.pl 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);
}


Loading…
Cancel
Save