Lets say I have text like this:
Lorem ipsum Lorem ipsum
Lorem ipsum Lorem ipsum
1. Row1 Lorem ipsum Lorem ipsum
Lorem ipsum Lorem ipsum
1.1 Row 2 Lorem ipsum Lorem ipsum
Lorem ipsum Lorem ipsum
1.1.1 Row 3 Lorem ipsum Lorem ipsum
the numbers on the begining of lines can consist only "1" with dot and it can go to multiple levels "1.1.1.1.1" etc. and I want using sed command target those lines with numbers and print them in three structure without those numbers so the result would be:
Row1 Lorem ipsum Lorem ipsum
Row 2 Lorem ipsum Lorem ipsum
Row 3 Lorem ipsum Lorem ipsum
I tried this command sed -rn 's/1.|1.1|1.1.1/'$'\t/p' Book2.txt but this doesnt print it in tree structure. I can use only sed command.
Can you help me please?