#convert Novell NAB formatted file to CSV file that can be imported into Outlook

#filenames & variables
$indir = 'c:\\work\\nab2csv\\nab';
$outdir = 'c:\\work\\nab2csv\\csv';

#Expressions to filter
my @filter = (
"^:::TAGMAP:::" ,
"\.IMDR" ,
"first administrative group" ,
"^\"G>" ,
"^\"G<" ,

opendir(DIR, "$indir");
my @files = readdir(DIR);

my $file;
my $keep;

foreach $file (@files) {
if ($file eq ".") {next};
if ($file eq "..") {next};
#input filename
my $infile = "$indir\\$file";
#output filename
my $newfile = $file;
$newfile =~ s/.NAB$/.CSV/gi;
$newfile = "$outdir\\$newfile";
open (OUT, ">$newfile");
#output NAB header to file
print OUT "::TAGMAP:::0FFE0003:***,Name,Business Phone,Department,Business Fax,E-Mail Address,First Name,Last Name,Title,Business Street,Business City,Business State,Business Country,Business Postal Code,E-Mail Type,Mailstop,Home Phone,Cellular Phone Number,Phone Number,Greeting,Owner,Company,Comments,User ID,Domain,Additional Routing,Post Office,GUID,NDS Distinguished Name,Network ID,\n";

open(LINES, "<$infile") or ( die "File error in:$infile");
my @lines = ;
close (LINES);

foreach $line (@lines) {
$keep = "yes";
foreach $filter (@filter) {
if ($line=~/$filter/gi) {
$keep = "no";
}#end if $filter
}#end foreach $filter

if ($keep eq "yes") {
$line =~ s/INTERNET://gi; #remove INTERNET: prefix
$line =~ s/^\"UT\"/\"U\"/i; #make dist list entries user entries
print OUT $line;
}#end if $keep

}#end foreach $line
close (OUT);#close output file
}#end foreach $file


Learn Perl: Perl Q&A: How do I do fill-in-the-blank for every file in a directory?
Anatomy of a perl one-line substitution command
perl -i[.backup-extension] -p -e 's#pat1#pat2#ig' files

Tells perl to run the command on the named files in-place, i.e., using the named files both as input and output. If a backup extension is provided, the unmodified version of each file will be saved with the extension appended.
Example: -i.bak
Tells perl to assume an input loop around your one-line program and echo the output.
The one-line program follows.
The perl "substitution" function. Matches every instance of the pattern pat1 and replaces it with pat2. The "#" used to delimit the patterns can be any character that isn't found in pat1 or pat2. The perl pattern matching used in pat1 is very powerful and somewhat complex; the main pitfall to remember is that you may need to escape special characters such as "." with a preceding backslash, e.g. "xyz\.rice\.edu". The trailing "i" flag means to ignore case when matching pat1. The trailing "g" flag means to apply the substitution multiple times on the same line (without the "g" it will only be applied to the leftmost pattern match on each line).
The file(s) on which the command should be run. In an HTML context, you probably want to specify a pattern in the shell to match your HTML files, taking into account any subdirectories you also want to include. Examples:


Windows 2000 Domain Controller Operations Master Roles How do I find out what server holds what role?
Probably the easiest method is to use the W2K version of netdom:
netdom query fsmo
Tips for Windows 2000 NT Administrators Wayne's Windows 2000 NT Administrator Tips
Excellent resource. It has good summaries of information relevant to best practices and administration.
Windows 2000 Domain Controller Operations Master Roles Admin Tip #56: Windows 2000 Domain Controller Operations Master Roles


CTX432571 - How to Disable Printing Notification Dialog Boxes in on a Windows NT Terminal Server with MetaFrame 1.x How to Disable Printing Notification Dialog Boxes in on a Windows NT Terminal Server with MetaFrame 1.x
CTX432571 - How to Disable Printing Notification Dialog Boxes in on a Windows NT Terminal Server with MetaFrame 1.x How to Disable Printing Notification Dialog Boxes in on a Windows NT Terminal Server with MetaFrame 1.x
We are already dealing in terabytes. In case you were wondering what comes
after that and how big is that really...

Kilobyte - (1,000 bytes) a very short story
Megabyte - (1,000,000 bytes) a small novel
Gigabyte - (1 billion bytes) Beethoven's 5th Symphony
Terabyte - (1,000 gigabytes) all the X-rays in a large hospital
Petabyte - (1,000 terabytes) half the contents of all US academic research
Exabyte - (1,000 petabytes) 5 exabytes - all the words people have ever
Zettabyte - 1,000 exabytes) as much information as there are grains of sand
on all the world's beaches.
Yottabyte - (1,000 zettabytes) as much information as there are atoms in
7,000 human bodies.

The world produced about three exabytes of new information in 2000, the
equivalent of about 500 novel-sized books,
or two floppy disks, for every man, woman, and child on earth.

- More new information will be created over the next two years than has been
created over the entire history of mankind.
- The amount of new information being created is doubling every year, with
no end in sight.
- Print comprises only .003 percent of the total.
- More information by far is created by individuals than businesses, a trend
researchers call the "democratization" of information.
- Already more than 80 billion photographs are taken every year, which would
require 80 million times more digital information storage than the same
number of words.


Tuning TcpMaxDataRetransmissions rate:
TCP/IP uses the initial packet round-trip time at the moment when the
session is initiated to determine what is "normal" for that connection.
Because of this, it is better to have a consistently slow WAN connection and
worse to have a connection that starts out fast and then becomes slow. Such
an erosion of connection speed is common when the connection is opened in
the morning and maintained into the work day.

To accommodate for this erosion of bandwidth, we modify the
TcpMaxDataRetransmissions value in the Citrix server registry.
TCP starts a retransmission timer when each outbound segment is handed down
to IP. If no acknowledgment is received for the data in a given segment
before the timer expires, the segment is retransmitted, up to the
TcpMaxDataRetransmissions times. The default value for this parameter is 5.

The retransmission timer is initialized to 3 seconds when a TCP connection
is established; however, it is adjusted "on the fly" to match the
characteristics of the connection using Smoothed Round Trip Time (SRTT)
calculations. The timer for a given segment is doubled after each
retransmission of that segment.

Using this algorithm, TCP tunes itself to the "normal" delay of a
connection. Because the default number of retries is five, the round-trip
time can double four times (or in other words become 16X slower than its
initial value) before the session is dropped. By increasing this number to
10, you are allowing the round-trip time to double nine times instead of
four, thereby allowing the connection quality to erode up to 512X its
original value before being dropped. For example, a connection that begins
with a roundtrip time of 20 milliseconds would have to erode to a round-trip
time of 10,240 milliseconds before being dropped by the server. The Networking Specific Search Engine presented by


CTX111133 - Maximizing Performance with Internet Explorer Document ID: CTX111133
This solution pertains to:
MetaFrame 1.8 for Microsoft NT Server 4.0, Terminal Server

Last modified: Thu Jan 04 10:34:29 2001

Maximizing Performance with Internet Explorer

“Setting up Personalized Settings” in Internet Explorer 4.0 may cause CPU congestion. Completely remove the following registry key (which runs the “Personalized Settings” setup and other Internet Explorer 4.0 settings at logon) for dramatic performance increase:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run BrowserWebCheck: REG_SZ: loadwc.exe