(command.CommandList children: [ (command.ShFunction keyword: <Id.KW_Function function> name_tok: <err_exit> name: err_exit body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <print> more_env: [] words: [{<print>} {<-u2>} {<-n>} {(DQ <Id.Lit_BadBackslash '\\'> <t>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <print> more_env: [] words: [ {<print>} {<-u2>} {<-r>} {(${ Id.VSub_Name Command) <Id.Lit_LBracket '['> ($ Id.VSub_Number 1) <Id.Lit_RBracket ']'> <Id.Lit_Colon ':'> } { (DQ (BracedVarSub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_At '@'> var_name: '@' suffix_op: (suffix_op.Slice begin:{<Id.Lit_Digits 2>}) right: <Id.Arith_RBrace _> ) ) } ] redirects: [] do_fork: T ) (command.Simple blame_tok: <let> more_env: [] words: [{<let>} {<Id.Lit_VarLike 'Errors+='> <1>}] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple blame_tok: <alias> more_env: [] words: [{<alias>} {<Id.Lit_VarLike 'err_exit='> (SQ <'err_exit $LINENO'>)}] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'Command='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'Command='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'Command='> name:Command) op: assign_op.Equal rhs: { (BracedVarSub 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 '}'> ) } ) ] redirects: [] ) (command.Simple blame_tok: <integer> more_env: [] words: [{<integer>} {<Id.Lit_VarLike 'Errors='> <0>}] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'bar='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'bar='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'bar='> name:bar) op: assign_op.Equal rhs: {<foo2>} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'bam='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'bam='> 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 ']'>} ) ] redirects: [] ) (command.ForEach keyword: <Id.KW_For for> iter_names: [i] iterable: (for_iter.Words words:[{<foo1>} {<foo2>} {<foo3>} {<foo4>} {<foo5>} {<foo6>}]) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.ShAssignment left: <Id.Lit_VarLike 'foo='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'foo='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'foo='> name:foo) op: assign_op.Equal rhs: {<0>} ) ] redirects: [] ) (command.Case case_kw: <Id.KW_Case case> to_match: (case_arg.Word w:{($ Id.VSub_DollarName i)}) arms_start: <Id.KW_In in> arms: [ (CaseArm left: <foo1> pattern: (pat.Words words:[{<foo1>}]) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'foo='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'foo='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'foo='> name:foo) op: assign_op.Equal rhs: {<1>} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <Id.VSub_DollarName '$bar'> pattern: (pat.Words words:[{($ Id.VSub_DollarName bar)}]) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'foo='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'foo='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'foo='> name:foo) op: assign_op.Equal rhs: {<2>} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <Id.VSub_DollarName '$bam'> pattern: (pat.Words words:[{($ Id.VSub_DollarName bam)}]) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'foo='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'foo='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'foo='> name:foo) op: assign_op.Equal rhs: {<3>} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <Id.Lit_ArrayLhsOpen 'foo['> pattern: (pat.Words words: [{<Id.Lit_ArrayLhsOpen 'foo['> <4> <Id.Lit_RBracket ']'>}] ) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'foo='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'foo='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'foo='> name:foo) op: assign_op.Equal rhs: {<4>} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <Id.Left_DollarBrace '${'> pattern: (pat.Words words: [ { (BracedVarSub 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> } ] ) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'foo='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'foo='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'foo='> name:foo) op: assign_op.Equal rhs: {<5>} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <Id.Left_DoubleQuote '"'> pattern: (pat.Words words: [ { (DQ (BracedVarSub 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> ) } ] ) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'foo='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'foo='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'foo='> name:foo) op: assign_op.Equal rhs: {<6>} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) ] arms_end: <Id.KW_Esac esac> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.DBracket left: <Id.KW_DLeftBracket '[['> expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {($ Id.VSub_DollarName i)} right: {<foo> ($ Id.VSub_DollarName foo)} ) right: <Id.Lit_DRightBracket ']]'> redirects: [] ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <err_exit> more_env: [] words: [ {<err_exit>} {(DQ ($ Id.VSub_DollarName i) <' not matching correct pattern'>)} ] redirects: [] do_fork: T ) ] spids: [234 248] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] right: <Id.KW_Done done> ) redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'f='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'f='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'f='> name:f) op: assign_op.Equal rhs: {(DQ <'[ksh92]'>)} ) ] redirects: [] ) (command.Case case_kw: <Id.KW_Case case> to_match: (case_arg.Word w:{($ Id.VSub_DollarName f)}) arms_start: <Id.KW_In in> arms: [ (CaseArm left: <Id.Lit_EscapedChar '\\['> pattern: (pat.Words words: [ {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\['> ch:'[') <Id.Lit_Star '*'> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\]'> ch: ']' ) } ] ) middle: <Id.Right_CasePat _> action: [] 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: <err_exit> more_env: [] words: [ {<err_exit>} { (DQ ($ Id.VSub_DollarName f) <' does not match '> <Id.Lit_BadBackslash '\\'> <'[*'> <Id.Lit_BadBackslash '\\'> <']'> ) } ] redirects: [] do_fork: T ) ] right: <Id.Op_DSemi _> ) ] arms_end: <Id.KW_Esac esac> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.DBracket left: <Id.KW_DLeftBracket '[['> expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: { (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <Id.VSub_DollarName '$SHELL'> more_env: [] 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'>} ) ] do_fork: T ) right: <Id.Eof_RParen _> ) } right: {<yes>} ) right: <Id.Lit_DRightBracket ']]'> redirects: [] ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <err_exit> more_env: [] words: [{<err_exit>} {(SQ <'case abc {...} not working'>)}] redirects: [] do_fork: T ) ] spids: [298 328] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.AndOr children: [ (command.DBracket left: <Id.KW_DLeftBracket '[['> expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: { (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <Id.VSub_DollarName '$SHELL'> more_env: [] words: [ {($ Id.VSub_DollarName SHELL)} {<-c>} { (SQ <'case a in\n'> <'a) print -n a > /dev/null ;&\n'> <'b) print b;;\n'> <esac> ) } ] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) } right: {<b>} ) right: <Id.Lit_DRightBracket ']]'> redirects: [] ) (command.Simple blame_tok: <err_exit> more_env: [] words: [{<err_exit>} {(SQ <'bug in ;& at end of script'>)}] redirects: [] do_fork: T ) ] ops: [<Id.Op_DAmp _>] ) (command.AndOr children: [ (command.DBracket left: <Id.KW_DLeftBracket '[['> expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <Id.VSub_DollarName '$SHELL'> more_env: [(EnvPair left:<Id.Lit_VarLike 'VMDEBUG='> name:VMDEBUG val:{<1>})] 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: [] do_fork: T ) right: <Id.Eof_RParen _> ) } right: {<foo.h>} ) right: <Id.Lit_DRightBracket ']]'> redirects: [] ) (command.Simple blame_tok: <err_exit> more_env: [] words: [{<err_exit>} {(DQ <'optimizer bug'>)}] redirects: [] do_fork: T ) ] ops: [<Id.Op_DPipe _>] ) (command.ShAssignment left: <Id.Lit_VarLike 'x='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'x='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'x='> name:x) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <Id.VSub_DollarName '$SHELL'> more_env: [] words: [ {($ Id.VSub_DollarName SHELL)} {<-ec>} {(SQ <'case a in a) echo 1; false; echo 2 ;& b) echo 3;; esac'>)} ] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) } ) ] redirects: [] ) (command.AndOr children: [ (command.DBracket left: <Id.KW_DLeftBracket '[['> expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName x)} right: {<1>} ) right: <Id.Lit_DRightBracket ']]'> redirects: [] ) (command.Simple blame_tok: <err_exit> more_env: [] words: [{<err_exit>} {(SQ <'set -e ignored on case fail through'>)}] redirects: [] do_fork: T ) ] ops: [<Id.Op_DPipe _>] ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: { (word_part.ArithSub left: <Id.Left_DollarDParen '$(('> anode: (arith_expr.TernaryOp cond: (arith_expr.Binary op_id: Id.Arith_Less left: ($ Id.Lit_ArithVarLike Errors) right: {<Id.Lit_Digits 125>} ) true_expr: ($ Id.Lit_ArithVarLike Errors) false_expr: {<Id.Lit_Digits 125>} ) right: <Id.Right_DollarDParen _> ) } ) ] )