(CommandList children: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id:BoolBinary_GlobNEqual left:{($ VSub_Pound '$#')} right:{(2)}) ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ('Usage ') ($ VSub_Number '$0') (' BASH_PROGRAM PREFIX'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[21])] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(3)}) ] spids: [16777215 16] ) ] spids: [16777215 35] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:SH_PROG) op:Equal rhs:{($ VSub_Number '$1')} spids:[37])] spids: [37] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:PREFIX) op:Equal rhs:{($ VSub_Number '$2')} spids:[40])] spids: [40] ) (Assignment keyword: Assign_Typeset flags: [-i] pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[47])] spids: [43] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:bash_loc) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {($ VSub_Name '$SH_PROG')} {(-c)} {(SQ <'echo ${SHELL}'>)})] ) left_token: <Left_CommandSub '$('> spids: [51 59] ) } spids: [50] ) ] spids: [50] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{($ VSub_QMark '$?')} spids:[61])] spids: [61] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child: (ArithBinary op_id: Arith_NEqual left: (ArithVarRef name:rc) right: (ArithWord w:{(Lit_Digits 0)}) ) ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ('Something went wrong in getting ') (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('SHELL for ') ($ VSub_Name '$SH_PROG') ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[84])] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{($ VSub_Name '$rc')}) ] spids: [16777215 79] ) ] spids: [16777215 99] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr:(BoolUnary op_id:BoolUnary_z child:{($ VSub_Name '$bash_loc')})) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ('Something went wrong in setting bash location from ') (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('SHELL for ') ($ VSub_Name '$SH_PROG') ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[118])] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(3)}) ] spids: [16777215 113] ) ] spids: [16777215 133] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:bashdb_main) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(strings)} {($ VSub_Name '$SH_PROG')}) (C {(grep)} {(bashdb)})] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [136 146] ) } spids: [135] ) ] spids: [135] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:check_loc) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(dirname)} { (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {($ VSub_Name '$bashdb_main')})] ) left_token: <Left_CommandSub '$('> spids: [152 156] ) } ) ] ) left_token: <Left_CommandSub '$('> spids: [149 157] ) } spids: [148] ) ] spids: [148] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobNEqual left: {($ VSub_Name '$PREFIX')} right: {($ VSub_Name '$check_loc')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ('bash says prefix should be ') ($ VSub_Name '$check_loc') ('. You gave ') ($ VSub_Name '$PREFIX') ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[178])] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(4)}) ] spids: [16777215 173] ) ] spids: [16777215 193] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] )