(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:temp)
          op: Equal
          rhs: {(/tmp/runsed) ($ VSub_Dollar '$$')}
        )
      ]
    )
    (command.Pipeline
      children: [
        (C {(find)} {(DQ ($ VSub_At '$@'))} {(-type)} {(f)} {(-print)})
        (command.WhileUntil
          keyword: <KW_While while>
          cond: [(C {(read)} {(file)})]
          body: 
            (command.DoGroup
              children: [
                (C {(echo)} {(-n)} {(DQ ('editing ') ($ VSub_DollarName '$file') (': '))})
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: (C {(test)} {(-s)} {($ VSub_DollarName '$file')})
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (command.Simple
                          words: [{(sed)} {(-e)} {(SQ <'s/[ \t]*$//g'>)}]
                          redirects: [
                            (redir.Redir
                              op: <Redir_Less '<'>
                              fd: 16777215
                              arg_word: {($ VSub_DollarName '$file')}
                            )
                            (redir.Redir
                              op: <Redir_Great '>'>
                              fd: 16777215
                              arg_word: {($ VSub_DollarName '$temp')}
                            )
                          ]
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: (C {(test)} {(-s)} {($ VSub_DollarName '$temp')})
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              action: [
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (C {(cmp)} {(-s)} {($ VSub_DollarName '$file')} 
                                              {($ VSub_DollarName '$temp')}
                                            )
                                          terminator: <Op_Semi ';'>
                                        )
                                      ]
                                      action: [(C {(echo)} {(-n)} {(DQ ('file not changed: '))})]
                                    )
                                  ]
                                  else_action: [
                                    (C {(cp)} {($ VSub_DollarName '$temp')} 
                                      {($ VSub_DollarName '$file')}
                                    )
                                  ]
                                )
                                (C {(echo)} {(DQ (done))})
                              ]
                            )
                          ]
                          else_action: [(C {(echo)} {(DQ ('produced an empty file - aborting'))})]
                        )
                      ]
                    )
                  ]
                  else_action: [(C {(echo)} {(DQ ('original file is empty.'))})]
                )
              ]
            )
        )
      ]
      negated: F
    )
    (C {(echo)} {(DQ ('all done'))})
    (C {(rm)} {(-f)} {($ VSub_DollarName '$temp')})
  ]
)