[Thread Prev][Thread Next][Thread Index]

Re: Names list into Pilot?



I had the attached sent to me from Darren Moffat in the UK who
wrote this bit of shell code to extract employees from the CBY03
mailstop from namex

It should help you. Once done you can just use install-memo to
take the created file and download it to the pilot


Jon


> Date: Fri, 5 Sep 1997 14:44:05 -0700
> From: Michael.Limprecht@Eng (Michael Limprecht)
> To: pilotmgr@xxxxxxxxxxxxxxxxxxx
> Subject: Names list into Pilot?
> 
> 
> Is there any why to get parts of the names list into the
> Pilot Address Book?
> 
> Or atleast does someone know what the text format is for the address
> book?
> 
> 
> Thanks,
> 
> Mick
> 
> BTW.  Pilotmgr works great!
> ---------------------------------------------------------------------
> ********************************************
> *   PLEASE DO NOT POST PILOTMANAGER BUGS   *
> *  TO THIS ALIAS.  SUBMIT BUG REPORTS VIA  *
> *     THE FEEDBACK MENU IN PILOTMANAGER    *
> *             --------------------         *
> *      This is a public mailing list!      *
> *  Please do not publish Sun proprietary   *
> *            information here!             *
> ********************************************

Jon

------------------------------------------------------------------
"Smelly cat, smelly cat, what are they feeding you? Smelly cat,
smelly cat, it's not you fault...." (Lyrics from Phoebe's song)
------------------------------------------------------------------
#!/usr/local/bin/perl

$nameslistx = "/usr/dist/share/lib/nameslistx";

open (NAMESLISTX, $nameslistx);

while (<NAMESLISTX>) {
        chop;
        @fields = split (/\|/);

        if ( $fields[1] eq "Version" ) {
                next;
        }
        if ( $fields[8] ne "CBY03") {
                next;
        }
        $surname = $fields[3];
        substr ($surname,1) =~ tr/A-Z/a-z/;
        $forename = $fields[5];
        substr ($forename,1) =~ tr/A-Z/a-z/;
        $worktel = $fields[14];
        $worktel = substr ($worktel, 1, 5);
        $email = $fields[15];

        printf ("\"%s\", \"%s\", \"\", \"Sun\", \"%s\", \"\", \"\", 
\"\",\"%s\",
 \"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"0\"\n",
                 $surname, $forename, $worktel, $email);


}

SourceForge.net Logo