(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:outfile)
          op: assign_op.Equal
          rhs: {(DQ (/tmp/rb.) ($ Id.VSub_Dollar '$$') (.tgz))}
          spids: [22]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:outfname)
          op: assign_op.Equal
          rhs: 
            {
              (DQ (backup.) 
                (command_sub
                  left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:32)
                  command_list: 
                    (command.CommandList
                      children: [
                        (C {(date)} 
                          {(Id.Lit_Other '+') (Id.Lit_Other '%') (y) (Id.Lit_Other '%') (m) 
                            (Id.Lit_Other '%') (d)
                          }
                        )
                      ]
                    )
                ) (.tgz)
              )
            }
          spids: [29]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:infile)
          op: assign_op.Equal
          rhs: {(DQ (/tmp/rb.) ($ Id.VSub_Dollar '$$') (.in))}
          spids: [46]
        )
      ]
    )
    (C {(trap)} 
      {
        (DQ 
          (command_sub
            left_token: (Token id:Id.Left_Backtick val:'`' span_id:57)
            command_list: (command.CommandList children:[(C {(which)} {(rm)})])
          ) (' -f ') ($ Id.VSub_DollarName '$outfile') (' ') ($ Id.VSub_DollarName '$infile')
        )
      } {(0)}
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {($ Id.VSub_Pound '$#')} {(-ne)} {(2)} {(-a)} 
                  {($ Id.VSub_Pound '$#')} {(-ne)} {(3)} {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:93)
            )
          ]
          action: [
            (command.Simple
              words: [
                {(echo)}
                {
                  (DQ ('Usage: ') 
                    (command_sub
                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:102)
                      command_list: 
                        (command.CommandList
                          children: [(C {(basename)} {($ Id.VSub_Number '$0')})]
                        )
                    ) (' backup-file-list remoteaddr {targetdir}')
                  )
                }
              ]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:110)
                  fd: -1
                  arg_word: {(2)}
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:114)
              arg_word: {(1)}
            )
          ]
          spids: [73 95]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-s)} {(DQ ($ Id.VSub_Number '$1'))} 
                  {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:135)
            )
          ]
          action: [
            (command.Simple
              words: [
                {(echo)}
                {(DQ ('Error: backup list ') ($ Id.VSub_Number '$1') (' is empty or missing'))}
              ]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:148)
                  fd: -1
                  arg_word: {(2)}
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:152)
              arg_word: {(1)}
            )
          ]
          spids: [121 137]
        )
      ]
    )
    (command.WhileUntil
      keyword: (Token id:Id.KW_While val:while span_id:169)
      cond: [
        (command.Sentence
          child: (C {(read)} {(entry)})
          terminator: (Token id:Id.Op_Semi val:';' span_id:174)
        )
      ]
      body: 
        (command.DoGroup
          children: [
            (command.Pipeline
              children: [
                (C {(echo)} {(DQ ($ Id.VSub_DollarName '$entry'))})
                (command.Simple
                  words: [{(sed)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:'s/ /\\\\ /g' span_id:192))}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_DGreat val:'>>' span_id:195)
                      fd: -1
                      arg_word: {($ Id.VSub_DollarName '$infile')}
                    )
                  ]
                )
              ]
              negated: F
            )
          ]
        )
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Less val:'<' span_id:201)
          fd: -1
          arg_word: {(DQ ($ Id.VSub_Number '$1'))}
        )
      ]
    )
    (command.Pipeline
      children: [
        (C {(tar)} {(czf)} {(-)} 
          {
            (command_sub
              left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:218)
              command_list: 
                (command.CommandList
                  children: [(C {(cat)} {($ Id.VSub_DollarName '$infile')})]
                )
            )
          }
        )
        (C {(uuencode)} {($ Id.VSub_DollarName '$outfname')})
        (C {(mail)} {(-s)} 
          {
            (DQ 
              (braced_var_sub
                token: (Token id:Id.VSub_Number val:3 span_id:242)
                suffix_op: 
                  (suffix_op.Unary
                    op_id: Id.VTest_ColonHyphen
                    arg_word: 
                      {('Backup archive for ') 
                        (command_sub
                          left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:245)
                          command_list: (command.CommandList children:[(C {(date)})])
                        )
                      }
                  )
              )
            )
          } {(DQ ($ Id.VSub_Number '$2'))}
        )
      ]
      negated: F
    )
    (C {(echo)} 
      {
        (DQ ('Done. ') 
          (command_sub
            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:261)
            command_list: (command.CommandList children:[(C {(basename)} {($ Id.VSub_Number '$0')})])
          ) (' backed up the following files:')
        )
      }
    )
    (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s/^/   /' span_id:272))} 
      {($ Id.VSub_DollarName '$infile')}
    )
    (C {(echo)} {(-n)} {(DQ ('and mailed them to ') ($ Id.VSub_Number '$2') (' '))})
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} {(DQ ($ Id.VSub_Number '$3'))} 
                  {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:301)
            )
          ]
          action: [(C {(echo)} {(DQ ('with requested target directory ') ($ Id.VSub_Number '$3'))})]
          spids: [287 303]
        )
      ]
      else_action: [(C {(echo)} {(DQ )})]
    )
    (command.ControlFlow token:(Token id:Id.ControlFlow_Exit val:exit span_id:324) arg_word:{(0)})
  ]
)