I'm trying to do something but i'm not sure how to do. I have a file of 23 Mo :
: (blah
:aaaaaaaaaaaaaaaaaaaa
(bbbbbbbbbbbbbbbbbbbb
: (bloh
cccccccc
dddddddd
...
And so on.
What il like to do is remove all line jump "\n" except when \n is followed by ": ("
So the final file would be:
: (blah :aaaaaaaaaaaaaaaaaaaa (bbbbbbbbbbbbbbbbbbbb
: (bloh cccccccc dddddddd
...
I have several idea to do it, the first one is:
- remove all "\n" with sed
- replace all ": (" by "\n: ("
but the problem is the file is 23MO and I don't know how to manage this on one line file of 23mo.
A second idea but still I don't know how to do at all, is:
- remove every "\n" except when it matchs in the pattern "\n: ("
I don't know how.
I'm limited to bash perl sed grep and awk as ressource.
I'd really love to have your inputs.
Have a nice day.