(command.CommandList
  children: [
    (command.Simple
      blame_tok: <typeset>
      more_env: []
      words: [{<typeset>} {<-i>} {<Id.Lit_VarLike 'rc='> <0>}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'SH_PROG='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'SH_PROG='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SH_PROG='> name:SH_PROG)
          op: assign_op.Equal
          rhs: 
            {
              (BracedVarSub
                left: <Id.Left_DollarBrace '${'>
                token: <Id.VSub_Name SH_PROG>
                var_name: SH_PROG
                suffix_op: 
                  (suffix_op.Unary
                    op: <Id.VTest_ColonHyphen _>
                    arg_word: {($ Id.VSub_DollarName SHELL)}
                  )
                right: <Id.Right_DollarBrace '}'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'SH_PROG='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'SH_PROG='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SH_PROG='> name:SH_PROG)
          op: assign_op.Equal
          rhs: 
            {
              (BracedVarSub
                left: <Id.Left_DollarBrace '${'>
                token: <Id.VSub_Name SH_PROG>
                var_name: SH_PROG
                suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:{<bash>})
                right: <Id.Right_DollarBrace '}'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'bash_loc='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'bash_loc='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'bash_loc='> name:bash_loc)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Simple
                    blame_tok: <Id.VSub_DollarName '$SH_PROG'>
                    more_env: []
                    words: [{($ Id.VSub_DollarName SH_PROG)} {<-c>} {(SQ <'echo ${SHELL}'>)}]
                    redirects: []
                    do_fork: T
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'rc='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'rc='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rc='> name:rc)
          op: assign_op.Equal
          rhs: {($ Id.VSub_QMark '?')}
        )
      ]
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DParen
                      left: <Id.Op_DLeftParen _>
                      child: 
                        (arith_expr.Binary
                          op_id: Id.Arith_NEqual
                          left: ($ Id.Lit_ArithVarLike rc)
                          right: {<Id.Lit_Digits 0>}
                        )
                      right: <Id.Op_DRightParen _>
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [
                {<echo>}
                {
                  (DQ <'Something went wrong in getting '> 
                    (word_part.EscapedLiteral
                      token: <Id.Lit_EscapedChar '\\$'>
                      ch: '$'
                    ) <'SHELL for '> ($ Id.VSub_DollarName SH_PROG)
                  )
                }
              ]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow
              keyword: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_DollarName rc)}
            )
          ]
          spids: [38 53]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      left: <Id.KW_DLeftBracket '[['>
                      expr: 
                        (bool_expr.Unary
                          op_id: Id.BoolUnary_z
                          child: {($ Id.VSub_DollarName bash_loc)}
                        )
                      right: <Id.Lit_DRightBracket ']]'>
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [
                {<echo>}
                {
                  (DQ <'Something went wrong in setting bash location from '> 
                    (word_part.EscapedLiteral
                      token: <Id.Lit_EscapedChar '\\$'>
                      ch: '$'
                    ) <'SHELL for '> ($ Id.VSub_DollarName SH_PROG)
                  )
                }
              ]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<3>})
          ]
          spids: [75 87]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'bashdb_main='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'bashdb_main='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'bashdb_main='> name:bashdb_main)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Pipeline
                    children: [
                      (command.Simple
                        blame_tok: <strings>
                        more_env: []
                        words: [{<strings>} {($ Id.VSub_DollarName bash_loc)}]
                        redirects: []
                        do_fork: T
                      )
                      (command.Simple
                        blame_tok: <grep>
                        more_env: []
                        words: [{<grep>} {<bashdb>}]
                        redirects: []
                        do_fork: T
                      )
                    ]
                    ops: [<Id.Op_Pipe _>]
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <echo>
      more_env: []
      words: [
        {<echo>}
        {
          (CommandSub
            left_token: <Id.Left_DollarParen '$('>
            child: 
              (command.Simple
                blame_tok: <dirname>
                more_env: []
                words: [
                  {<dirname>}
                  {
                    (CommandSub
                      left_token: <Id.Left_DollarParen '$('>
                      child: 
                        (command.Simple
                          blame_tok: <dirname>
                          more_env: []
                          words: [
                            {<dirname>}
                            {
                              (CommandSub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Simple
                                    blame_tok: <dirname>
                                    more_env: []
                                    words: [{<dirname>} {($ Id.VSub_DollarName bashdb_main)}]
                                    redirects: []
                                    do_fork: T
                                  )
                                right: <Id.Eof_RParen _>
                              )
                            }
                          ]
                          redirects: []
                          do_fork: T
                        )
                      right: <Id.Eof_RParen _>
                    )
                  }
                ]
                redirects: []
                do_fork: T
              )
            right: <Id.Eof_RParen _>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)