(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:tid)
          op: assign_op.Equal
          rhs: {(DQ <'sftp batchfile'>)}
          spids: [7]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:BATCH)
          op: assign_op.Equal
          rhs: {(${ Id.VSub_Name OBJ) <'/sftp.bb'>}
          spids: [13]
        )
      ]
    )
    (C {<rm>} {<-rf>} {(${ Id.VSub_Name COPY)} {(${ Id.VSub_Name COPY) <.1>} {(${ Id.VSub_Name COPY) <.2>} 
      {(${ Id.VSub_Name COPY) <.dd>} {(${ Id.VSub_Name BATCH) <.> <Id.Lit_Star '*'>}
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<EOF>}
              here_end_span_id: 92
              stdin_parts: [
                <'\tget '>
                ($ Id.VSub_DollarName '$DATA')
                <' '>
                ($ Id.VSub_DollarName '$COPY')
                <'\n'>
                <'\tput '>
                (${ Id.VSub_Name COPY)
                <' '>
                (${ Id.VSub_Name COPY)
                <'.1\n'>
                <'\trm '>
                (${ Id.VSub_Name COPY)
                <'\n'>
                <'\t-put '>
                (${ Id.VSub_Name COPY)
                <' '>
                (${ Id.VSub_Name COPY)
                <'.2\n'>
              ]
            )
        )
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {(${ Id.VSub_Name BATCH) <.pass.1>}
        )
      ]
      do_fork: T
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<EOF>}
              here_end_span_id: 112
              stdin_parts: [
                <'\t# This is a comment\n'>
                <'\n'>
                <'\t# That was a blank line\n'>
                <'\tls\n'>
              ]
            )
        )
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {(${ Id.VSub_Name BATCH) <.pass.2>}
        )
      ]
      do_fork: T
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<EOF>}
              here_end_span_id: 157
              stdin_parts: [
                <'\tget '>
                ($ Id.VSub_DollarName '$DATA')
                <' '>
                ($ Id.VSub_DollarName '$COPY')
                <'\n'>
                <'\tput '>
                (${ Id.VSub_Name COPY)
                <' '>
                (${ Id.VSub_Name COPY)
                <'.3\n'>
                <'\trm '>
                (${ Id.VSub_Name COPY)
                <'.*\n'>
                <'\t# The next command should fail\n'>
                <'\tput '>
                (${ Id.VSub_Name COPY)
                <'.3 '>
                (${ Id.VSub_Name COPY)
                <'.4\n'>
              ]
            )
        )
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {(${ Id.VSub_Name BATCH) <.fail.1>}
        )
      ]
      do_fork: T
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<EOF>}
              here_end_span_id: 175
              stdin_parts: [<'\t# The next command should fail\n'> <'\tjajajajaja\n'>]
            )
        )
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {(${ Id.VSub_Name BATCH) <.fail.2>}
        )
      ]
      do_fork: T
    )
    (C {<verbose>} {(DQ ($ Id.VSub_DollarName '$tid') <': good commands'>)})
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (command.Simple
          words: [
            {(${ Id.VSub_Name SFTP)}
            {<-b>}
            {(${ Id.VSub_Name BATCH) <.pass.1>}
            {<-D>}
            {(${ Id.VSub_Name SFTPSERVER)}
          ]
          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
        )
        (C {<fail>} {(DQ <'good commands failed'>)})
      ]
    )
    (C {<verbose>} {(DQ ($ Id.VSub_DollarName '$tid') <': bad commands'>)})
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (command.Simple
          words: [
            {(${ Id.VSub_Name SFTP)}
            {<-b>}
            {(${ Id.VSub_Name BATCH) <.fail.1>}
            {<-D>}
            {(${ Id.VSub_Name SFTPSERVER)}
          ]
          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
        )
        (C {<fail>} {(DQ <'bad commands succeeded'>)})
      ]
    )
    (C {<verbose>} {(DQ ($ Id.VSub_DollarName '$tid') <': comments and blanks'>)})
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (command.Simple
          words: [
            {(${ Id.VSub_Name SFTP)}
            {<-b>}
            {(${ Id.VSub_Name BATCH) <.pass.2>}
            {<-D>}
            {(${ Id.VSub_Name SFTPSERVER)}
          ]
          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
        )
        (C {<fail>} {(DQ <'comments & blanks failed'>)})
      ]
    )
    (C {<verbose>} {(DQ ($ Id.VSub_DollarName '$tid') <': junk command'>)})
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (command.Simple
          words: [
            {(${ Id.VSub_Name SFTP)}
            {<-b>}
            {(${ Id.VSub_Name BATCH) <.fail.2>}
            {<-D>}
            {(${ Id.VSub_Name SFTPSERVER)}
          ]
          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
        )
        (C {<fail>} {(DQ <'junk command succeeded'>)})
      ]
    )
    (C {<rm>} {<-rf>} {(${ Id.VSub_Name COPY)} {(${ Id.VSub_Name COPY) <.1>} {(${ Id.VSub_Name COPY) <.2>} 
      {(${ Id.VSub_Name COPY) <.dd>} {(${ Id.VSub_Name BATCH) <.> <Id.Lit_Star '*'>}
    )
  ]
)