- The problem statement, all variables and given/known data:
I have to write a script using sed, which delete everything between curly brackets and the brackets themself. The brackets might be nested.
The input-file is:
aaa { bbb ccc { ddd eee } fff { ggg hhh } iii jjj } kkk { lll mmm } nnn ooo ppp
The output-file should be:
aaa kkk nnn ooo ppp
-
Relevant commands, code, scripts, algorithms:
The script should be written in sed.
Use of the pattern/hold space should be used economically, because for larger files the script still has to be usable. -
The attempts at a solution (include all code and scripts):
I have tried a few things but usually only can delete the first pair of brackets.
- Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
University Gent, Gent, Belgium, Peter Dawyndt and C002718
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).