(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:temp)
          op: assign_op.Equal
          rhs: {<'/tmp/runsed'> ($ Id.VSub_Dollar '$$')}
          spids: [41]
        )
      ]
    )
    (command.Pipeline
      children: [
        (C {<find>} {(DQ ($ Id.VSub_At '$@'))} {<-type>} {<f>} {<-print>})
        (command.WhileUntil
          keyword: <Id.KW_While while>
          cond: (condition.Shell commands:[(C {<read>} {<file>})])
          body: 
            (command.DoGroup
              children: [
                (C {<echo>} {<-n>} {(DQ <'editing '> ($ Id.VSub_DollarName '$file') <': '>)})
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: (C {<test>} {<-s>} {($ Id.VSub_DollarName '$file')})
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (command.Simple
                          words: [{<sed>} {<-e>} {(SQ <'s/[ \t]*$//g'>)}]
                          redirects: [
                            (redir
                              op: <Id.Redir_Less '<'>
                              loc: (redir_loc.Fd fd:0)
                              arg: {($ Id.VSub_DollarName '$file')}
                            )
                            (redir
                              op: <Id.Redir_Great '>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {($ Id.VSub_DollarName '$temp')}
                            )
                          ]
                          do_fork: T
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: (C {<test>} {<-s>} {($ Id.VSub_DollarName '$temp')})
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (command.Sentence
                                              child: 
                                                (C {<cmp>} {<-s>} {($ Id.VSub_DollarName '$file')} 
                                                  {($ Id.VSub_DollarName '$temp')}
                                                )
                                              terminator: <Id.Op_Semi _>
                                            )
                                          ]
                                        )
                                      action: [(C {<echo>} {<-n>} {(DQ <'file not changed: '>)})]
                                      spids: [120 131]
                                    )
                                  ]
                                  else_action: [
                                    (C {<cp>} {($ Id.VSub_DollarName '$temp')} 
                                      {($ Id.VSub_DollarName '$file')}
                                    )
                                  ]
                                )
                                (C {<echo>} {(DQ <done>)})
                              ]
                              spids: [108 117]
                            )
                          ]
                          else_action: [(C {<echo>} {(DQ <'produced an empty file - aborting'>)})]
                        )
                      ]
                      spids: [80 89]
                    )
                  ]
                  else_action: [(C {<echo>} {(DQ <'original file is empty.'>)})]
                )
              ]
            )
        )
      ]
      negated: F
    )
    (C {<echo>} {(DQ <'all done'>)})
    (C {<rm>} {<-f>} {($ Id.VSub_DollarName '$temp')})
  ]
)