(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:tid)
          op: assign_op.Equal
          rhs: {(DQ <'basic sftp put/get with ssh.com server'>)}
          spids: [7]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SFTPCMDFILE)
          op: assign_op.Equal
          rhs: {(${ Id.VSub_Name OBJ) <'/batch'>}
          spids: [13]
        )
      ]
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName '$SFTPCMDFILE')}
        )
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<EOF>}
              here_end_span_id: 44
              stdin_parts: [
                <'version\n'>
                <'get '>
                ($ Id.VSub_DollarName '$DATA')
                <' '>
                (${ Id.VSub_Name COPY)
                <'.1\n'>
                <'put '>
                ($ Id.VSub_DollarName '$DATA')
                <' '>
                (${ Id.VSub_Name COPY)
                <'.2\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:BUFFERSIZE)
          op: assign_op.Equal
          rhs: {(DQ <'5 1000 32000 64000'>)}
          spids: [46]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:REQUESTS)
          op: assign_op.Equal
          rhs: {(DQ <'1 2 10'>)}
          spids: [51]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <X> (${ Id.VSub_Name TEST_COMBASE))} 
                      {<Id.Lit_Equals '='>} {(DQ <X>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<fatal>} {(SQ <'$TEST_COMBASE is not set'>)})]
          spids: [60 80]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:VERSIONS)
          op: assign_op.Equal
          rhs: 
            {
              (DQ <'\n'> <'\t2.0.10\n'> <'\t2.0.12\n'> <'\t2.0.13\n'> <'\t2.1.0\n'> <'\t2.2.0\n'> 
                <'\t2.3.0\n'> <'\t2.3.1\n'> <'\t2.4.0\n'> <'\t3.0.0\n'> <'\t3.1.0\n'> <'\t3.2.0\n'> <'\t3.2.2\n'> <'\t3.2.3\n'> 
                <'\t3.2.5\n'> <'\t3.2.9\n'> <'\t3.2.9.1\n'> <'\t3.3.0'>
              )
            }
          spids: [92]
        )
      ]
    )
    (command.ForEach
      iter_name: v
      iter_words: [{(${ Id.VSub_Name VERSIONS)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:server)
                  op: assign_op.Equal
                  rhs: {(${ Id.VSub_Name TEST_COMBASE) <'/'> (${ Id.VSub_Name v) <'/sftp-server2'>}
                  spids: [132]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-x>} 
                              {(${ Id.VSub_Name server)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Continue continue>)]
                  spids: [143 158]
                )
              ]
            )
            (C {<verbose>} {(DQ <'sftp-server '> ($ Id.VSub_DollarName '$v'))})
            (command.ForEach
              iter_name: B
              iter_words: [{(${ Id.VSub_Name BUFFERSIZE)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.ForEach
                      iter_name: R
                      iter_words: [{(${ Id.VSub_Name REQUESTS)}]
                      do_arg_iter: F
                      body: 
                        (command.DoGroup
                          children: [
                            (C {<verbose>} 
                              {
                                (DQ <'test '> ($ Id.VSub_DollarName '$tid') <': buffer_size '> 
                                  ($ Id.VSub_DollarName '$B') <' num_requests '> ($ Id.VSub_DollarName '$R')
                                )
                              }
                            )
                            (C {<rm>} {<-f>} {(${ Id.VSub_Name COPY) <.1>} {(${ Id.VSub_Name COPY) <.2>})
                            (command.Simple
                              words: [
                                {(${ Id.VSub_Name SFTP)}
                                {<-D>}
                                {(${ Id.VSub_Name server)}
                                {<-B>}
                                {($ Id.VSub_DollarName '$B')}
                                {<-R>}
                                {($ Id.VSub_DollarName '$R')}
                                {<-b>}
                                {($ Id.VSub_DollarName '$SFTPCMDFILE')}
                              ]
                              redirects: [
                                (redir
                                  op: <Id.Redir_Great '>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<'/dev/null'>}
                                )
                                (redir
                                  op: <Id.Redir_GreatAnd '2>&'>
                                  loc: (redir_loc.Fd fd:2)
                                  arg: {<1>}
                                )
                              ]
                              do_fork: T
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:r)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_QMark '$?')}
                                  spids: [262]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$r')} 
                                              {<-ne>} {<0>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<fail>} {(DQ <'sftp failed with '> ($ Id.VSub_DollarName '$r'))})
                                  ]
                                  spids: [266 279]
                                )
                              ]
                              else_action: [
                                (command.AndOr
                                  ops: [Id.Op_DPipe]
                                  children: [
                                    (C {<cmp>} {($ Id.VSub_DollarName '$DATA')} 
                                      {(${ Id.VSub_Name COPY) <.1>}
                                    )
                                    (C {<fail>} {(DQ <'corrupted copy after get'>)})
                                  ]
                                )
                                (command.AndOr
                                  ops: [Id.Op_DPipe]
                                  children: [
                                    (C {<cmp>} {($ Id.VSub_DollarName '$DATA')} 
                                      {(${ Id.VSub_Name COPY) <.2>}
                                    )
                                    (C {<fail>} {(DQ <'corrupted copy after put'>)})
                                  ]
                                )
                              ]
                            )
                          ]
                        )
                    )
                  ]
                )
            )
          ]
        )
    )
    (C {<rm>} {<-f>} {(${ Id.VSub_Name COPY) <.1>} {(${ Id.VSub_Name COPY) <.2>})
    (C {<rm>} {<-f>} {($ Id.VSub_DollarName '$SFTPCMDFILE')})
  ]
)