(command.CommandList
  children: [
    (command.Simple blame_tok:<set> more_env:[] words:[{<set>} {<-e>}] redirects:[] do_fork:T)
    (command.ShAssignment
      left: <Id.Lit_VarLike 'count_only_flag='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'count_only_flag='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count_only_flag='> name:count_only_flag)
          op: assign_op.Equal
          rhs: {(DQ )}
        )
      ]
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {(DQ ($ Id.VSub_Number 1))}
                        {<Id.Lit_Equals '='>}
                        {(DQ <-c>)}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'count_only_flag='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'count_only_flag='>
                  lhs: 
                    (sh_lhs_expr.Name
                      left: <Id.Lit_VarLike 'count_only_flag='>
                      name: count_only_flag
                    )
                  op: assign_op.Equal
                  rhs: {<1>}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <shift>
              more_env: []
              words: [{<shift>}]
              redirects: []
              do_fork: T
            )
          ]
          spids: [12 29]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'extended_syntax_flag='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'extended_syntax_flag='>
          lhs: 
            (sh_lhs_expr.Name
              left: <Id.Lit_VarLike 'extended_syntax_flag='>
              name: extended_syntax_flag
            )
          op: assign_op.Equal
          rhs: {(DQ )}
        )
      ]
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {(DQ ($ Id.VSub_Number 1))}
                        {<Id.Lit_Equals '='>}
                        {(DQ <-x>)}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'extended_syntax_flag='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'extended_syntax_flag='>
                  lhs: 
                    (sh_lhs_expr.Name
                      left: <Id.Lit_VarLike 'extended_syntax_flag='>
                      name: extended_syntax_flag
                    )
                  op: assign_op.Equal
                  rhs: {(DQ <-x>)}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <shift>
              more_env: []
              words: [{<shift>}]
              redirects: []
              do_fork: T
            )
          ]
          spids: [45 62]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.Simple
      blame_tok: <trap>
      more_env: []
      words: [{<trap>} {(DQ <'kill 0; exit 1'>)} {<int>}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'count='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'count='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count)
          op: assign_op.Equal
          rhs: {<0>}
        )
      ]
      redirects: []
    )
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [filename]
      iterable: (for_iter.Words words:[{(DQ ($ Id.VSub_At '@'))}])
      semi_tok: <Id.Op_Semi _>
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <let>
              more_env: []
              words: [
                {<let>}
                {<Id.Lit_VarLike 'count+='> 
                  (DQ 
                    (CommandSub
                      left_token: <Id.Left_DollarParen '$('>
                      child: 
                        (command.Simple
                          blame_tok: <bats-exec-test>
                          more_env: []
                          words: [{<bats-exec-test>} {<-c>} {(DQ ($ Id.VSub_DollarName filename))}]
                          redirects: []
                          do_fork: T
                        )
                      right: <Id.Eof_RParen _>
                    )
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {<-n>}
                        {(DQ ($ Id.VSub_DollarName count_only_flag))}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ ($ Id.VSub_DollarName count))}]
              redirects: []
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit>)
          ]
          spids: [120 133]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.Simple
      blame_tok: <echo>
      more_env: []
      words: [{<echo>} {(DQ <1..> ($ Id.VSub_DollarName count))}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'status='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'status='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'status='> name:status)
          op: assign_op.Equal
          rhs: {<0>}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'offset='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'offset='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'offset='> name:offset)
          op: assign_op.Equal
          rhs: {<0>}
        )
      ]
      redirects: []
    )
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [filename]
      iterable: (for_iter.Words words:[{(DQ ($ Id.VSub_At '@'))}])
      semi_tok: <Id.Op_Semi _>
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'index='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'index='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'index='> name:index)
                  op: assign_op.Equal
                  rhs: {<0>}
                )
              ]
              redirects: []
            )
            (BraceGroup
              left: <Id.Lit_LBrace '{'>
              children: [
                (command.Simple
                  blame_tok: <read>
                  more_env: [(EnvPair left:<Id.Lit_VarLike 'IFS='> name:IFS val:(rhs_word__Empty))]
                  words: [{<read>} {<-r>}]
                  redirects: []
                  do_fork: T
                )
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <read>
                              more_env: [(EnvPair left:<Id.Lit_VarLike 'IFS='> name:IFS val:(rhs_word__Empty))]
                              words: [{<read>} {<-r>} {<line>}]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  body: 
                    (command.DoGroup
                      left: <Id.KW_Do do>
                      children: [
                        (command.Case
                          case_kw: <Id.KW_Case case>
                          to_match: (case_arg.Word w:{(DQ ($ Id.VSub_DollarName line))})
                          arms_start: <Id.KW_In in>
                          arms: [
                            (CaseArm
                              left: <Id.Left_DoubleQuote '"'>
                              pattern: (pat.Words words:[{(DQ <'begin '>) <Id.Lit_Star '*'>}])
                              middle: <Id.Right_CasePat _>
                              action: [
                                (command.Simple
                                  blame_tok: <let>
                                  more_env: []
                                  words: [{<let>} {<Id.Lit_VarLike 'index+='> <1>}]
                                  redirects: []
                                  do_fork: T
                                )
                                (command.Simple
                                  blame_tok: <echo>
                                  more_env: []
                                  words: [
                                    {<echo>}
                                    {
                                      (DQ 
                                        (BracedVarSub
                                          left: <Id.Left_DollarBrace '${'>
                                          token: <Id.VSub_Name line>
                                          var_name: line
                                          suffix_op: 
                                            (suffix_op.PatSub
                                              pat: {<' '> ($ Id.VSub_DollarName index) <' '>}
                                              replace: 
                                                {<' '> 
                                                  (word_part.ArithSub
                                                    left: <Id.Left_DollarDParen '$(('>
                                                    anode: 
                                                      (arith_expr.Binary
                                                        op_id: Id.Arith_Plus
                                                        left: {($ Id.VSub_DollarName offset)}
                                                        right: {($ Id.VSub_DollarName index)}
                                                      )
                                                    right: <Id.Right_DollarDParen _>
                                                  ) <' '>
                                                }
                                              replace_mode: Id.Undefined_Tok
                                              slash_tok: <Id.VOp2_Slash _>
                                            )
                                          right: <Id.Right_DollarBrace '}'>
                                        )
                                      )
                                    }
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                              right: <Id.Op_DSemi _>
                            )
                            (CaseArm
                              left: <Id.Left_DoubleQuote '"'>
                              pattern: 
                                (pat.Words
                                  words: [
                                    {(DQ <'ok '>) <Id.Lit_Star '*'>}
                                    {(DQ <'not ok '>) <Id.Lit_Star '*'>}
                                  ]
                                )
                              middle: <Id.Right_CasePat _>
                              action: [
                                (command.AndOr
                                  children: [
                                    (command.Simple
                                      blame_tok: <Id.Lit_LBracket '['>
                                      more_env: []
                                      words: [
                                        {<Id.Lit_LBracket '['>}
                                        {<-n>}
                                        {(DQ ($ Id.VSub_DollarName extended_syntax_flag))}
                                        {<Id.Lit_RBracket ']'>}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <let>
                                      more_env: []
                                      words: [{<let>} {<Id.Lit_VarLike 'index+='> <1>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  ops: [<Id.Op_DPipe _>]
                                )
                                (command.Simple
                                  blame_tok: <echo>
                                  more_env: []
                                  words: [
                                    {<echo>}
                                    {
                                      (DQ 
                                        (BracedVarSub
                                          left: <Id.Left_DollarBrace '${'>
                                          token: <Id.VSub_Name line>
                                          var_name: line
                                          suffix_op: 
                                            (suffix_op.PatSub
                                              pat: {<' '> ($ Id.VSub_DollarName index) <' '>}
                                              replace: 
                                                {<' '> 
                                                  (word_part.ArithSub
                                                    left: <Id.Left_DollarDParen '$(('>
                                                    anode: 
                                                      (arith_expr.Binary
                                                        op_id: Id.Arith_Plus
                                                        left: {($ Id.VSub_DollarName offset)}
                                                        right: {($ Id.VSub_DollarName index)}
                                                      )
                                                    right: <Id.Right_DollarDParen _>
                                                  ) <' '>
                                                }
                                              replace_mode: Id.Undefined_Tok
                                              slash_tok: <Id.VOp2_Slash _>
                                            )
                                          right: <Id.Right_DollarBrace '}'>
                                        )
                                      )
                                    }
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                                (command.AndOr
                                  children: [
                                    (command.Simple
                                      blame_tok: <Id.Lit_LBracket '['>
                                      more_env: []
                                      words: [
                                        {<Id.Lit_LBracket '['>}
                                        {
                                          (DQ 
                                            (BracedVarSub
                                              left: <Id.Left_DollarBrace '${'>
                                              token: <Id.VSub_Name line>
                                              var_name: line
                                              suffix_op: 
                                                (suffix_op.Slice
                                                  begin: {<Id.Lit_Digits 0>}
                                                  length: {<Id.Lit_Digits 6>}
                                                )
                                              right: <Id.Arith_RBrace _>
                                            )
                                          )
                                        }
                                        {<Id.KW_Bang '!'> <Id.Lit_Equals '='>}
                                        {(DQ <'not ok'>)}
                                        {<Id.Lit_RBracket ']'>}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.ShAssignment
                                      left: <Id.Lit_VarLike 'status='>
                                      pairs: [
                                        (AssignPair
                                          left: <Id.Lit_VarLike 'status='>
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'status='>
                                              name: status
                                            )
                                          op: assign_op.Equal
                                          rhs: {<1>}
                                        )
                                      ]
                                      redirects: []
                                    )
                                  ]
                                  ops: [<Id.Op_DPipe _>]
                                )
                              ]
                              right: <Id.Op_DSemi _>
                            )
                            (CaseArm
                              left: <Id.Lit_Star '*'>
                              pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
                              middle: <Id.Right_CasePat _>
                              action: [
                                (command.Simple
                                  blame_tok: <echo>
                                  more_env: []
                                  words: [{<echo>} {(DQ ($ Id.VSub_DollarName line))}]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                              right: <Id.Op_DSemi _>
                            )
                          ]
                          arms_end: <Id.KW_Esac esac>
                          redirects: []
                        )
                      ]
                      right: <Id.KW_Done done>
                    )
                  redirects: []
                )
              ]
              redirects: [
                (Redir
                  op: <Id.Redir_Less '<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    {
                      (CommandSub
                        left_token: <Id.Left_ProcSubIn '<('>
                        child: 
                          (command.Simple
                            blame_tok: <bats-exec-test>
                            more_env: []
                            words: [
                              {<bats-exec-test>}
                              {($ Id.VSub_DollarName extended_syntax_flag)}
                              {(DQ ($ Id.VSub_DollarName filename))}
                            ]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              right: <Id.Lit_RBrace '}'>
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'offset='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'offset='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'offset='> name:offset)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (word_part.ArithSub
                        left: <Id.Left_DollarDParen '$(('>
                        anode: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Plus
                            left: {($ Id.VSub_DollarName offset)}
                            right: {($ Id.VSub_DollarName index)}
                          )
                        right: <Id.Right_DollarDParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: []
    )
    (command.ControlFlow
      keyword: <Id.ControlFlow_Exit exit>
      arg_word: {(DQ ($ Id.VSub_DollarName status))}
    )
  ]
)