(command.CommandList
  children: [
    (C {(Id.KW_Set set)} {(-e)})
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:common_objpfx)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [54]
                )
              ]
            )
          terminator: (Token id:Id.Op_Semi val:';' span_id:56)
        )
        (C {(shift)})
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:test_program_prefix)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [60]
                )
              ]
            )
          terminator: (Token id:Id.Op_Semi val:';' span_id:62)
        )
        (C {(shift)})
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:testout)
          op: assign_op.Equal
          rhs: {(${ Id.VSub_Name common_objpfx) (/grp/tst_fgetgrent.out)}
          spids: [67]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:result)
          op: assign_op.Equal
          rhs: {(0)}
          spids: [74]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (command.Simple
          words: [
            {(${ Id.VSub_Name test_program_prefix)}
            {(${ Id.VSub_Name common_objpfx) (grp/tst_fgetgrent)}
            {(0)}
          ]
          redirects: [
            (redir.Redir
              op: (Token id:Id.Redir_Great val:'>' span_id:90)
              fd: -1
              arg_word: {(${ Id.VSub_Name testout)}
            )
          ]
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:result)
              op: assign_op.Equal
              rhs: {(1)}
              spids: [98]
            )
          ]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (command.Simple
          words: [
            {(${ Id.VSub_Name test_program_prefix)}
            {(${ Id.VSub_Name common_objpfx) (grp/tst_fgetgrent)}
            {(1)}
          ]
          redirects: [
            (redir.Redir
              op: (Token id:Id.Redir_DGreat val:'>>' span_id:114)
              fd: -1
              arg_word: {(${ Id.VSub_Name testout)}
            )
          ]
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:result)
              op: assign_op.Equal
              rhs: {(1)}
              spids: [122]
            )
          ]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (command.Simple
          words: [
            {(${ Id.VSub_Name test_program_prefix)}
            {(${ Id.VSub_Name common_objpfx) (grp/tst_fgetgrent)}
            {(2)}
          ]
          redirects: [
            (redir.Redir
              op: (Token id:Id.Redir_DGreat val:'>>' span_id:138)
              fd: -1
              arg_word: {(${ Id.VSub_Name testout)}
            )
          ]
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:result)
              op: assign_op.Equal
              rhs: {(1)}
              spids: [146]
            )
          ]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (command.Simple
          words: [
            {(${ Id.VSub_Name test_program_prefix)}
            {(${ Id.VSub_Name common_objpfx) (grp/tst_fgetgrent)}
            {(3)}
          ]
          redirects: [
            (redir.Redir
              op: (Token id:Id.Redir_DGreat val:'>>' span_id:162)
              fd: -1
              arg_word: {(${ Id.VSub_Name testout)}
            )
          ]
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:result)
              op: assign_op.Equal
              rhs: {(1)}
              spids: [170]
            )
          ]
        )
      ]
    )
    (command.ControlFlow
      token: (Token id:Id.ControlFlow_Exit val:exit span_id:174)
      arg_word: {($ Id.VSub_DollarName '$result')}
    )
  ]
)