Ignore:
Timestamp:
02/27/12 16:38:58 (13 years ago)
Author:
Eric.Larour
Message:

New script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/externalpackages/dyson/ldap.pl

    r11222 r11556  
    77$bn="jplbadgenumber"; $txt="$bn".".txt"; $db="jplusers.db";                # Initialize values
    88#
    9 system(`$ldb -x -h $lds -b $ou uid=* filter $bn > $txt`);                     # Execute LDAPsearch, write to file
     9system(`$ldb -x -h $lds -b $ou uid=* uid > $txt`);                         # Execute LDAPsearch, write to file
    1010#
    1111open(I,"<$txt");                                                           # Open input file handle
    1212  open(O,">badges.tmp");                                                   # Open output file handle
    1313    while (<I>) { chomp($_);                                               # Spool through input file
    14       if ($_=~"^uid=") {                                                   # If line begins with UID value,
    15         $_=~s/uid=//; $_=~s/,(.*)$//; $_=~s/\n//;                          #   strip line of extraneous data
     14      if ($_ =~ "^uid: ") {                                                # If line begins with UID value,
     15        $_=~s/uid: //; $_=~s/,(.*)$//; $_=~s/\n//;                         #   strip line of extraneous data
    1616        if (!($_=~/^\d\d\d\d\d\d/)) { print O "$_\n"; }                    # If UID is non-numeric, print output
    1717      }                                                                    # Close condition
Note: See TracChangeset for help on using the changeset viewer.