(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:tid)
          op: Equal
          rhs: {(DQ ('sftp invalid commands'))}
          spids: [7]
        )
      ]
      spids: [7]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:DATA2)
          op: Equal
          rhs: {(/bin/sh) (${ VSub_Name EXEEXT)}
          spids: [13]
        )
      ]
      spids: [13]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:NONEXIST)
          op: Equal
          rhs: {(/NONEXIST.) ($ VSub_Dollar '$$')}
          spids: [19]
        )
      ]
      spids: [19]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:GLOBFILES)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (Subshell
                        child: 
                          (CommandList
                            children: [
                              (Sentence
                                child: (C {(cd)} {(/bin)})
                                terminator: <Op_Semi ';'>
                              )
                              (C {(echo)} {(l) (Lit_Other '*')})
                            ]
                          )
                        spids: [25 34]
                      )
                    ]
                  )
                left_token: <Left_Backtick '`'>
                spids: [24 35]
              )
            }
          spids: [23]
        )
      ]
      spids: [23]
    )
    (C {(rm)} {(-rf)} {(${ VSub_Name COPY)} {(${ VSub_Name COPY) (.1)} {(${ VSub_Name COPY) (.2)} 
      {(${ VSub_Name COPY) (.dd)}
    )
    (C {(rm)} {(-f)} {(${ VSub_Name COPY)})
    (C {(verbose)} {(DQ ($ VSub_Name '$tid') (': get nonexistent'))})
    (AndOr
      children: [
        (Pipeline
          children: [
            (C {(echo)} {(DQ ('get ') ($ VSub_Name '$NONEXIST') (' ') ($ VSub_Name '$COPY'))})
            (SimpleCommand
              words: [{(${ VSub_Name SFTP)} {(-D)} {(${ VSub_Name SFTPSERVER)}]
              redirects: [
                (Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[98])
                (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[101])
              ]
            )
          ]
          negated: False
        )
        (C {(fail)} {(DQ ('get nonexistent failed'))})
      ]
      op_id: Op_DPipe
    )
    (AndOr
      children: [
        (C {(test)} {(-f)} {(${ VSub_Name COPY)})
        (C {(fail)} {(DQ ('existing copy after get nonexistent'))})
      ]
      op_id: Op_DAmp
    )
    (C {(rm)} {(-f)} {(${ VSub_Name COPY) (.dd/) (Lit_Other '*')})
    (C {(verbose)} {(DQ ($ VSub_Name '$tid') (': glob get to nonexistent directory'))})
    (AndOr
      children: [
        (Pipeline
          children: [
            (C {(echo)} {(DQ ('get /bin/l* ') ($ VSub_Name '$NONEXIST'))})
            (SimpleCommand
              words: [{(${ VSub_Name SFTP)} {(-D)} {(${ VSub_Name SFTPSERVER)}]
              redirects: [
                (Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[167])
                (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[170])
              ]
            )
          ]
          negated: False
        )
        (C {(fail)} {(DQ ('get nonexistent failed'))})
      ]
      op_id: Op_DPipe
    )
    (ForEach
      iter_name: x
      iter_words: [{($ VSub_Name '$GLOBFILES')}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (AndOr
              children: [
                (C {(test)} {(-f)} {(${ VSub_Name COPY) (.dd/) ($ VSub_Name '$x')})
                (C {(fail)} {(DQ ('existing copy after get nonexistent'))})
              ]
              op_id: Op_DAmp
            )
          ]
          spids: [192 213]
        )
      spids: [188 190]
    )
    (C {(rm)} {(-f)} {(${ VSub_Name COPY)})
    (C {(verbose)} {(DQ ($ VSub_Name '$tid') (': put nonexistent'))})
    (AndOr
      children: [
        (Pipeline
          children: [
            (C {(echo)} {(DQ ('put ') ($ VSub_Name '$NONEXIST') (' ') ($ VSub_Name '$COPY'))})
            (SimpleCommand
              words: [{(${ VSub_Name SFTP)} {(-D)} {(${ VSub_Name SFTPSERVER)}]
              redirects: [
                (Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[252])
                (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[255])
              ]
            )
          ]
          negated: False
        )
        (C {(fail)} {(DQ ('put nonexistent failed'))})
      ]
      op_id: Op_DPipe
    )
    (AndOr
      children: [
        (C {(test)} {(-f)} {(${ VSub_Name COPY)})
        (C {(fail)} {(DQ ('existing copy after put nonexistent'))})
      ]
      op_id: Op_DAmp
    )
    (C {(rm)} {(-f)} {(${ VSub_Name COPY) (.dd/) (Lit_Other '*')})
    (C {(verbose)} {(DQ ($ VSub_Name '$tid') (': glob put to nonexistent directory'))})
    (AndOr
      children: [
        (Pipeline
          children: [
            (C {(echo)} {(DQ ('put /bin/l* ') (${ VSub_Name COPY) (.dd))})
            (SimpleCommand
              words: [{(${ VSub_Name SFTP)} {(-D)} {(${ VSub_Name SFTPSERVER)}]
              redirects: [
                (Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[324])
                (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[327])
              ]
            )
          ]
          negated: False
        )
        (C {(fail)} {(DQ ('put nonexistent failed'))})
      ]
      op_id: Op_DPipe
    )
    (ForEach
      iter_name: x
      iter_words: [{($ VSub_Name '$GLOBFILES')}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (AndOr
              children: [
                (C {(test)} {(-f)} {(${ VSub_Name COPY) (.dd/) ($ VSub_Name '$x')})
                (C {(fail)} {(DQ ('existing copy after nonexistent'))})
              ]
              op_id: Op_DAmp
            )
          ]
          spids: [349 370]
        )
      spids: [345 347]
    )
    (C {(rm)} {(-f)} {(${ VSub_Name COPY)})
    (C {(verbose)} {(DQ ($ VSub_Name '$tid') (': rename nonexistent'))})
    (AndOr
      children: [
        (Pipeline
          children: [
            (C {(echo)} {(DQ ('rename ') ($ VSub_Name '$NONEXIST') (' ') (${ VSub_Name COPY) (.1))})
            (SimpleCommand
              words: [{(${ VSub_Name SFTP)} {(-D)} {(${ VSub_Name SFTPSERVER)}]
              redirects: [
                (Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[412])
                (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[415])
              ]
            )
          ]
          negated: False
        )
        (C {(fail)} {(DQ ('rename nonexist failed'))})
      ]
      op_id: Op_DPipe
    )
    (AndOr
      children: [
        (C {(test)} {(-f)} {(${ VSub_Name COPY) (.1)})
        (C {(fail)} {(DQ ('file exists after rename nonexistent'))})
      ]
      op_id: Op_DAmp
    )
    (C {(rm)} {(-rf)} {(${ VSub_Name COPY)} {(${ VSub_Name COPY) (.dd)})
    (C {(cp)} {($ VSub_Name '$DATA')} {($ VSub_Name '$COPY')})
    (C {(mkdir)} {(${ VSub_Name COPY) (.dd)})
    (C {(verbose)} {(DQ ($ VSub_Name '$tid') (': rename target exists (directory)'))})
    (AndOr
      children: [
        (Pipeline
          children: [
            (C {(echo)} {(DQ ('rename ') ($ VSub_Name '$COPY') (' ') (${ VSub_Name COPY) (.dd))})
            (SimpleCommand
              words: [{(${ VSub_Name SFTP)} {(-D)} {(${ VSub_Name SFTPSERVER)}]
              redirects: [
                (Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[503])
                (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[506])
              ]
            )
          ]
          negated: False
        )
        (C {(fail)} {(DQ ('rename target exists (directory) failed'))})
      ]
      op_id: Op_DPipe
    )
    (AndOr
      children: [
        (C {(test)} {(-f)} {(${ VSub_Name COPY)})
        (C {(fail)} {(DQ ('oldname missing after rename target exists (directory)'))})
      ]
      op_id: Op_DPipe
    )
    (AndOr
      children: [
        (C {(test)} {(-d)} {(${ VSub_Name COPY) (.dd)})
        (C {(fail)} {(DQ ('newname missing after rename target exists (directory)'))})
      ]
      op_id: Op_DPipe
    )
    (AndOr
      children: [
        (SimpleCommand
          words: [{(cmp)} {($ VSub_Name '$DATA')} {(${ VSub_Name COPY)}]
          redirects: [
            (Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[560])
            (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[563])
          ]
        )
        (C {(fail)} {(DQ ('corrupted oldname after rename target exists (directory)'))})
      ]
      op_id: Op_DPipe
    )
    (C {(rm)} {(-f)} {(${ VSub_Name COPY) (.dd/) (Lit_Other '*')})
    (C {(rm)} {(-rf)} {(${ VSub_Name COPY)})
    (C {(cp)} {(${ VSub_Name DATA2)} {(${ VSub_Name COPY)})
    (C {(verbose)} {(DQ ($ VSub_Name '$tid') (': glob put files to local file'))})
    (Pipeline
      children: [
        (C {(echo)} {(DQ ('put /bin/l* ') ($ VSub_Name '$COPY'))})
        (SimpleCommand
          words: [{(${ VSub_Name SFTP)} {(-D)} {(${ VSub_Name SFTPSERVER)}]
          redirects: [
            (Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[629])
            (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[632])
          ]
        )
      ]
      negated: False
    )
    (AndOr
      children: [
        (C {(cmp)} {(${ VSub_Name DATA2)} {(${ VSub_Name COPY)})
        (C {(fail)} {(DQ ('put successed when it should have failed'))})
      ]
      op_id: Op_DPipe
    )
    (C {(rm)} {(-rf)} {(${ VSub_Name COPY)} {(${ VSub_Name COPY) (.1)} {(${ VSub_Name COPY) (.2)} 
      {(${ VSub_Name COPY) (.dd)}
    )
  ]
)