(command.CommandList children: [ (command.ShFunction name: err_exit body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (C {<print>} {<-u2>} {<-n>} {(DQ <Id.Lit_BadBackslash '\\'> <t>)}) (C {<print>} {<-u2>} {<-r>} {(${ Id.VSub_Name Command) <Id.Lit_LBracket '['> ($ Id.VSub_Number 1) <Id.Lit_RBracket ']'> <Id.Lit_Colon ':'> } { (DQ (braced_var_sub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_At '@'> var_name: '@' suffix_op: (suffix_op.Slice begin:{<Id.Lit_Digits 2>}) right: <Id.Arith_RBrace _> ) ) } ) (C {<let>} {<Id.Lit_VarLike 'Errors+='> <1>}) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (C {<alias>} {<Id.Lit_VarLike 'err_exit='> (SQ <'err_exit $LINENO'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'Command='> name:Command) op: assign_op.Equal rhs: { (braced_var_sub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Number 0> var_name: 0 suffix_op: (suffix_op.Unary op: <Id.VOp1_DPound '##'> arg_word: {<Id.Lit_Other '*'> <Id.Lit_Slash '/'>} ) right: <Id.Right_DollarBrace '}'> ) } spids: [114] ) ] redirects: [] ) (C {<integer>} {<Id.Lit_VarLike 'Errors='> <0>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'bar='> name:bar) op: assign_op.Equal rhs: {<foo2>} spids: [128] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'bam='> name:bam) op: assign_op.Equal rhs: {<Id.Lit_ArrayLhsOpen 'foo['> <3> <Id.Lit_RBracket ']'>} spids: [131] ) ] redirects: [] ) (command.ForEach iter_names: [i] iterable: (for_iter.Words words:[{<foo1>} {<foo2>} {<foo3>} {<foo4>} {<foo5>} {<foo6>}]) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'foo='> name:foo) op: assign_op.Equal rhs: {<0>} spids: [156] ) ] redirects: [] ) (command.Case to_match: {($ Id.VSub_DollarName i)} arms: [ (case_arm pat_list: [{<foo1>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'foo='> name:foo) op: assign_op.Equal rhs: {<1>} spids: [170] ) ] redirects: [] ) ] spids: [167 168 172 -1] ) (case_arm pat_list: [{($ Id.VSub_DollarName bar)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'foo='> name:foo) op: assign_op.Equal rhs: {<2>} spids: [178] ) ] redirects: [] ) ] spids: [175 176 180 -1] ) (case_arm pat_list: [{($ Id.VSub_DollarName bam)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'foo='> name:foo) op: assign_op.Equal rhs: {<3>} spids: [186] ) ] redirects: [] ) ] spids: [183 184 188 -1] ) (case_arm pat_list: [{<Id.Lit_ArrayLhsOpen 'foo['> <4> <Id.Lit_RBracket ']'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'foo='> name:foo) op: assign_op.Equal rhs: {<4>} spids: [196] ) ] redirects: [] ) ] spids: [191 194 198 -1] ) (case_arm pat_list: [ { (braced_var_sub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Name bar> var_name: bar suffix_op: (suffix_op.Unary op: <Id.VOp1_Percent '%'> arg_word: {<Id.Lit_Other '?'>} ) right: <Id.Right_DollarBrace '}'> ) <5> } ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'foo='> name:foo) op: assign_op.Equal rhs: {<5>} spids: [210] ) ] redirects: [] ) ] spids: [201 207 212 -1] ) (case_arm pat_list: [ { (DQ (braced_var_sub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Name bar> var_name: bar suffix_op: (suffix_op.Unary op: <Id.VOp1_Percent '%'> arg_word: {<Id.Lit_Other '?'>} ) right: <Id.Right_DollarBrace '}'> ) <6> ) } ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'foo='> name:foo) op: assign_op.Equal rhs: {<6>} spids: [226] ) ] redirects: [] ) ] spids: [215 223 228 -1] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {($ Id.VSub_DollarName i)} right: {<foo> ($ Id.VSub_DollarName foo)} ) redirects: [] ) ] ) action: [ (C {<err_exit>} {(DQ ($ Id.VSub_DollarName i) <' not matching correct pattern'>)}) ] spids: [234 248] ) ] else_action: [] redirects: [] ) ] ) redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'f='> name:f) op: assign_op.Equal rhs: {(DQ <'[ksh92]'>)} spids: [262] ) ] redirects: [] ) (command.Case to_match: {($ Id.VSub_DollarName f)} arms: [ (case_arm pat_list: [ {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\['> ch:'[') <Id.Lit_Star '*'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\]'> ch:']') } ] action: [] spids: [273 276 278 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (C {<err_exit>} { (DQ ($ Id.VSub_DollarName f) <' does not match '> <Id.Lit_BadBackslash '\\'> <'[*'> <Id.Lit_BadBackslash '\\'> <']'> ) } ) ] spids: [280 281 293 -1] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Simple words: [ {($ Id.VSub_DollarName SHELL)} {<-c>} { (SQ <'\n'> <'\t\tx=$(case abc {\n'> <'\t\t\tabc)\t{ print yes;};;\n'> <'\t\t\t*)\t print no;;\n'> <'\t\t\t}\n'> <'\t\t)\n'> <'\t\tprint -r -- "$x"'> ) } ] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] more_env: [] do_fork: T ) right: <Id.Eof_RParen _> ) } right: {<yes>} ) redirects: [] ) ] ) action: [(C {<err_exit>} {(SQ <'case abc {...} not working'>)})] spids: [298 328] ) ] else_action: [] redirects: [] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {($ Id.VSub_DollarName SHELL)} {<-c>} { (SQ <'case a in\n'> <'a) print -n a > /dev/null ;&\n'> <'b) print b;;\n'> <esac> ) } ) right: <Id.Eof_RParen _> ) } right: {<b>} ) redirects: [] ) (C {<err_exit>} {(SQ <'bug in ;& at end of script'>)}) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Simple words: [ {($ Id.VSub_DollarName SHELL)} {<-c>} { (SQ <'\n'> <'\ttmp=foo\n'> <'\tfor i in a b\n'> <'\tdo\tcase $i in\n'> <'\t\ta)\t: tmp=$tmp tmp.h=$tmp.h;;\n'> <'\t\tb)\t( tmp=bar )\n'> <'\t\t\tfor j in a\n'> <'\t\t\tdo\tprint -r -- $tmp.h\n'> <'\t\t\tdone\n'> <'\t\t\t;;\n'> <'\t\tesac\n'> <'\tdone\n'> ) } ] redirects: [] more_env: [(env_pair name:VMDEBUG val:{<1>} spids:[370])] do_fork: T ) right: <Id.Eof_RParen _> ) } right: {<foo.h>} ) redirects: [] ) (C {<err_exit>} {(DQ <'optimizer bug'>)}) ] ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {(word_part.ArithSub anode:($ Id.Lit_ArithVarLike Errors))} ) ] )