[clue-tech] Script Help

Ballon, Mike Mike.Ballon at echostar.com
Tue May 10 16:53:53 MDT 2005


I wrote a tiny script for parse some output from an Exchange 2003 widget,
the input file contains data like what you see below.  Now on the first two
lines you'll notice the input is "constant" but on the third the user is
under a sub ou and I just can't figure out how to compensate for the
variable position of the second important field.  In the first two lines the
position of the field I want is 4th, on the 3rd line it's 5th.  What the
Exchange widge is suppose to show mailboxes that do not have a 1-1
relationship so I need an output if the username in val1 doesn't equal the
username in val2.  The important data here being "userX", other stuff I
could care less about.  Only thing I've come up with is doing a "count" of
"cn" first and creating seperate input files and script for each "numbered"
ou and I just don't want to :)  Can someone morf mine into something that
works?  Many Thanks...
 
DATA
 
Matched 'cn=usera,cn=Recipients,ou=something,o=something else' to
'CN=usera,OU=office,OU=office2,OU=Users and Groups,DC=domain,DC=com' based
on SID.
Matched 'cn=userb,cn=Recipients,ou=somthing,o=something else' to
'CN=userb,OU=office,OU=office2,OU=Users and Groups,DC=domain,DC=com' based
on SID.
Matched 'cn=userc,cn=wayway,cn=outeast,ou=something,o=something else' to
'CN=userc,OU=outeast,OU=support,OU=Users and Groups,DC=domain,DC=com' based
on SID.
 
PARSE
cat ez.log | grep Matched | awk -F"[Cc][Nn]=" '{print $2 $4}' | awk -F","
'$1 != $2 {print $1","$2}'



More information about the clue-tech mailing list