(command.CommandList children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {($ Id.VSub_Pound '$#')} right: {<2>} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Simple words: [{<echo>} {(DQ <'Usage '> ($ Id.VSub_Number '$0') <' BASH_PROGRAM PREFIX'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<3>}) ] spids: [3 16] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SH_PROG) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [37] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PREFIX) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [40] ) ] ) (C {<typeset>} {<-i>} {<Id.Lit_VarLike 'rc='> <0>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:bash_loc) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {($ Id.VSub_DollarName '$SH_PROG')} {<-c>} {(SQ <'echo ${SHELL}'>)}) ) } spids: [50] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:rc) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [61] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_NEqual left: <Id.Lit_ArithVarLike rc> right: {<Id.Lit_Digits 0>} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Simple words: [ {<echo>} { (DQ <'Something went wrong in getting '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'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 token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName '$rc')} ) ] spids: [64 79] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_z child: {($ Id.VSub_DollarName '$bash_loc')} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Simple words: [ {<echo>} { (DQ <'Something went wrong in setting bash location from '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'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 token:<Id.ControlFlow_Exit exit> arg_word:{<3>}) ] spids: [101 113] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:bashdb_main) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<strings>} {($ Id.VSub_DollarName '$SH_PROG')}) (C {<grep>} {<bashdb>}) ] negated: F ) ) } spids: [135] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:check_loc) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<dirname>} { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<dirname>} {($ Id.VSub_DollarName '$bashdb_main')}) ) } ) ) } spids: [148] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {($ Id.VSub_DollarName '$PREFIX')} right: {($ Id.VSub_DollarName '$check_loc')} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Simple words: [ {<echo>} { (DQ <'bash says prefix should be '> ($ Id.VSub_DollarName '$check_loc') <'. You gave '> ($ Id.VSub_DollarName '$PREFIX') ) } ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<4>}) ] spids: [159 173] ) ] ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )