I would like to compare two of my log files generated before and after an implementation to see if it has impacted anything. However, the order of the logs I get is not the same all the time. Since, the log file also has multiple indented lines, when I tried to sort, everything is sorted. But, I would like to keep the child intact with the parent. Indented lines are spaces and not tab.

Any help would be greatly appreciated. I am fine with any windows solution or Linux one.

Eg of the file:

#This is a sample code

```
Parent1 to be verified

    Child1 to be verified

    Child2 to be verified
        Child21 to be verified
        Child23 to be verified
        Child22 to be verified
            Child221 to be verified

    Child4 to be verified

    Child5 to be verified
        Child53 to be verified
        Child52 to be verified
            Child522 to be verified
            Child521 to be verified

    Child3 to be verified

```