-   Linux - Newbie ( -   -   Manipulating data per paragraph (
TsubasaJM 08-23-2011 03:52 AM  Manipulating data per paragraph
Hi there,  I'm still pretty novice to bash, but I have some
experience in manipulating data per line by using the 'while
read' structure and for example extracting some data with awk
and such.  Now I have an ldif file, which has data in it per
paragraph (separated by a newline). Now I want to extract data
from it (different attributes in it) per ldif record, which is
harder cause there is no 'read paragraph' of course. :)
Example, if I have an ldif file like this:  dn:
uid=test1,cn=example,cn=dom time: 20110822105940
modifyTimestamp: 20110822085944Z  dn:
uid=test2,cn=example,cn=dom time: 20110822105941
modifyTimestamp: 20110822085945Z  dn:
uid=test3,cn=example,cn=dom time: 20110822105942
modifyTimestamp: 20110822085946Z  I want to be able to do checks
and compares of attributes in every record, like comparing time
and modifyTimestamp, but I need to do it in all of the records
(skip n