[clue-tech] Script Help
Keith Hellman
khellman at mcprogramming.com
Tue May 10 18:55:19 MDT 2005
On Tue, May 10, 2005 at 04:53:53PM -0600, Ballon, Mike wrote:
> 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}'
What about preprocessing it with sed?
cat ez.log | grep Matched | sed 's/\(cn=\).*cn=/\1/' |awk ...
Or some such...
--
Keith Hellman #include <disclaimer.h>
khellman at mcprogramming.com from disclaimer import standard
public key @ www.mcprogramming.com
A tuple, a dict, and a list,
And whitespace which mus'n't be missed.
Imported together,
And stirred with a feather,
Yields a language whose name must be hissed!
-- Python Limmerick Contest submission by Roy Smith
http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/d7a780beaff2e88a/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://cluedenver.org/pipermail/clue-tech/attachments/20050510/67cdb862/attachment.bin
More information about the clue-tech
mailing list