Indentation using awk

  1. The problem statement, all variables and given/known data:
    I need to write an awk program who does this (sorry its too big)

  2. Relevant commands, code, scripts, algorithms:
    ..

  3. The attempts at a solution (include all code and scripts):
    declaring a new variable which counts the { }
    for each { the counter increases and for each } decreases
    before any line put spaces * $counter (using while..I think)
    I was working on it over an hour and I'm desperate..

  4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
    lessons taken by private teacher Noa Zrachia

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).

Thank you!

You're using the same approach I'd have picked then.. What have you tried?

  1. Could you post the input file in text format, taken from the picture?
    Wrapped in "code" tags please.
  2. Then your attempted awk code. In "code" tags please.