I've used gawk (Gnu AWK) scripts to manipulate directory exports. It's
fairly simple to pick up and is pretty handy for these types of things.
here's an awk script that will do this:
----------------------------------------------------------------------------
-
#extract Display Name and email addresses from Exchange directory dump
BEGIN {FS="\t"}
{
print $4 "\t" $9
}
----------------------------------------------------------------------------
--
I use the tab character as the separator in the directory export because
there are sometimes commas in the other fields which makes parsing the file
more difficult. This script expects Display Name to be in the 4th field
position and Email address to be the 9th field (which is what my Exchange
export defaults to). You could make the script more robust by searching for
the field headers so it would work if the exports aren't all in the same
format.
Jeff
-----Original Message-----
From: Ryan McBride [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 04, 2001 8:14 PM
To: NT System Admin Issues
Subject: Exchange Server Directory Export
Hey All
Just wondering if anyone has written a little script or something that will
go and sort the CSV file that exchange dumps it directoy export into. I want
to grab all the names and SMTP addresses, problem is same field also
contains CC Mail, X400, MS Mail, Etc
Any help woudl be great
Thanx all
- -
Ryan McBride (MCSE)
Network & Comms Administrator
Strategic Management Works
http://www.smw.com.au
+612-9906-9611
---------------------------------------------------------------------------
The content of this email is intended only for the ordinary user of the
email address to which it is addressed. This email may contain copyright,
privileged and/or confidential information. Persons other than the intended
recipient may not read, retransmit, disseminate, store, copy or take any
action in reliance upon this information. If you have received this
information in error, please delete the information from any computer and
contact the sender.
http://www.sunbelt-software.com/ntsysadmin_list_charter.htm
http://www.sunbelt-software.com/ntsysadmin_list_charter.htm