(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:json) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Simple redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {<'/dev/stdin'>} ) ] do_fork: F ) ) } spids: [3] ) (assign_pair lhs: (sh_lhs_expr.Name name:oldlang) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$LANG')} spids: [9] ) (assign_pair lhs: (sh_lhs_expr.Name name:LANG) op: assign_op.Equal rhs: {<C>} spids: [12] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:str) op: assign_op.Equal rhs: {(SQ <'("(\\\\.|[^\\\\"])*")'>)} spids: [15] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:num) op: assign_op.Equal rhs: {(DQ <'(-?(0|[1-9][0-9]*)('> <Id.Lit_BadBackslash '\\'> <'.[0-9]+)?([eE][+-]?[0-9]+)?)'>)} spids: [23] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:val) op: assign_op.Equal rhs: {(DQ <'((str|num|obj|arr)[a-j]+|true|false|null)'>)} spids: [30] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:arr) op: assign_op.Equal rhs: { (DQ <Id.Lit_BadBackslash '\\'> <'[('> ($ Id.VSub_DollarName '$val') <'(,'> ($ Id.VSub_DollarName '$val') <')*)?]'> ) } spids: [35] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:obj) op: assign_op.Equal rhs: { (DQ <Id.Lit_BadBackslash '\\'> <'{(str[a-j]+:'> ($ Id.VSub_DollarName '$val') <'(,str[a-j]+:'> ($ Id.VSub_DollarName '$val') <')*)?}'> ) } spids: [45] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tr) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ (word.BracedTree parts: [ (word_part.BracedRange kind: Id.Range_Char start: a end: j step: 1 ) (word_part.BracedRange kind: Id.Range_Char start: a end: j step: 1 ) (word_part.BracedRange kind: Id.Range_Char start: a end: j step: 1 ) ] ) ] ) } spids: [55] ) ] ) (C {<declare>} {<-n>} {<match>}) (command.ShFunction name: push body: (BraceGroup children: [ (command.Sentence child: (C {<declare>} {<-gn>} {<Id.Lit_VarLike 'list='> (${ Id.VSub_Name type) <_list>}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:list) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (DQ (braced_var_sub token: <Id.VSub_Name BASH_REMATCH> bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 1>}) ) ) } ] ) } spids: [96] ) ] ) terminator: <Id.Op_Semi _> ) ] ) ) (command.ShFunction name: match body: (command.ForEach iter_names: [match] iterable: (for_iter.Words words:[{<str>} {<num>} {<obj>} {<arr>}]) body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(braced_var_sub token:<Id.VSub_Name match> prefix_op:(Id.VSub_Bang))} right: {<str>} ) right: (bool_expr.LogicalNot child: (bool_expr.Binary op_id: Id.BoolBinary_ne left: {<i> <Id.Lit_Other '+'> <Id.Lit_Other '+'>} right: {<0>} ) ) ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:json) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name json> suffix_op: (suffix_op.PatSub pat: {<'['> (single_quoted left: <Id.Left_DollarSingleQuote '$\''> tokens: [ <Id.Char_Literals ' '> <Id.Char_OneChar '\\t'> <Id.Char_OneChar '\\n'> <Id.Char_OneChar '\\r'> ] multiline: F ) <']'> } replace_mode: Id.Lit_Slash ) ) } spids: [165] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {($ Id.VSub_DollarName '$json')} right: {($ Id.VSub_DollarName '$match') <Id.Lit_Other '('> <Id.Lit_Other .> <Id.Lit_Other '*'> <Id.Lit_Other ')'> } ) ) (BraceGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:type) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name match> prefix_op: (Id.VSub_Bang) ) } spids: [199] ) ] ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Return return>) terminator: <Id.Op_Semi _> ) ] ) ] ) ] ) ) ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [(command.Sentence child:(C {<match>}) terminator:<Id.Op_Semi _>)] ) body: (command.DoGroup children: [ (C {<push>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:json) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name json> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Percent '%'> arg_word: {(DQ ($ Id.VSub_DollarName '$BASH_REMATCH'))} ) ) ($ Id.VSub_DollarName '$type') (braced_var_sub token: <Id.VSub_Name tr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.Binary op_id: Id.Arith_Minus left: { (braced_var_sub token: <Id.VSub_Name list> prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } right: {<Id.Lit_Digits 1>} ) ) ) (braced_var_sub token: <Id.VSub_Name BASH_REMATCH> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.Unary op_id:Id.Node_UnaryMinus child:{<Id.Lit_Digits 1>}) ) ) } spids: [228] ) ] ) ] ) ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {($ Id.VSub_DollarName '$json')} right: {<Id.Lit_Other '^'> ($ Id.VSub_DollarName '$val') <Id.Lit_Other '$'>} ) ) (command.ControlFlow token:<Id.ControlFlow_Exit exit>) ] ) (C {<declare>} {<-A>} {<rt>}) (command.ForEach iter_names: [i] iterable: (for_iter.Words words: [ { (DQ (braced_var_sub token: <Id.VSub_Name tr> bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } ] ) body: (command.DoGroup children: [ (command.Sentence child: (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (arith_expr.Binary op_id: Id.Arith_LBracket left: <Id.Lit_ArithVarLike rt> right: {($ Id.VSub_DollarName '$i')} ) right: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: <Id.Lit_ArithVarLike j> ) ) ) terminator: <Id.Op_Semi _> ) ] ) ) (command.CommandList children: [ (command.Sentence child:(C {<set>} {<-f>}) terminator:<Id.Op_Semi _>) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LANG) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$oldlang')} spids: [335] ) (assign_pair lhs: (sh_lhs_expr.Name name:IFS) op: assign_op.Equal rhs: {<Id.Lit_Colon ':'> <Id.Lit_Comma ','>} spids: [338] ) (assign_pair lhs: (sh_lhs_expr.Name name:regex) op: assign_op.Equal rhs: {(SQ <'(\\\\[nftrb]|\\\\\\\\|\\\\u[a-f0-9]{4})'>)} spids: [342] ) ] ) ] ) (C {<shopt>} {<-s>} {<nocasematch>}) (command.ShFunction name: print body: (command.Case to_match: {($ Id.VSub_Number '$1')} arms: [ (case_arm pat_list: [{<null>} {<true>} {<false>}] action: [(C {<printf>} {(DQ ($ Id.VSub_Number '$1'))})] spids: [366 371 379 -1] ) (case_arm pat_list: [{<str> <Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tmp) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name str_list> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.Binary op_id: Id.Arith_LBracket left: <Id.Lit_ArithVarLike rt> right: { (braced_var_sub token: <Id.VSub_Number 1> suffix_op: (suffix_op.Slice begin:{<Id.Lit_Digits 3>}) ) } ) ) ) } spids: [386] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {($ Id.VSub_DollarName '$tmp')} right: {($ Id.VSub_DollarName '$regex') <Id.Lit_Other '('> <Id.Lit_Other .> <Id.Lit_Other '*'> <Id.Lit_Other ')'> } ) ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (C {<printf>} {<Id.Lit_Other '%'> <s>} { (DQ (braced_var_sub token: <Id.VSub_Name tmp> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Percent '%'> arg_word: {(DQ ($ Id.VSub_DollarName '$BASH_REMATCH'))} ) ) ) } ) (command.Case to_match: { (braced_var_sub token: <Id.VSub_Name BASH_REMATCH> bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 1>}) ) } arms: [ (case_arm pat_list: [ {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'>) <u0008>} ] action: [(C {<printf>} {(SQ <'\\\\b'>)})] spids: [450 452 460 -1] ) (case_arm pat_list: [ {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'>) <u0009>} ] action: [(C {<printf>} {(SQ <'\\\\t'>)})] spids: [462 464 472 -1] ) (case_arm pat_list: [ {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'>) <u000a>} ] action: [(C {<printf>} {(SQ <'\\\\n'>)})] spids: [475 477 485 -1] ) (case_arm pat_list: [ {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'>) <u000c>} ] action: [(C {<printf>} {(SQ <'\\\\f'>)})] spids: [487 489 497 -1] ) (case_arm pat_list: [ {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'>) <u000d>} ] action: [(C {<printf>} {(SQ <'\\\\r'>)})] spids: [500 502 510 -1] ) (case_arm pat_list: [ {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'>) <u0022>} ] action: [(C {<printf>} {(SQ <'\\\\"'>)})] spids: [512 514 522 -1] ) (case_arm pat_list: [ {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'>) <u005c>} ] action: [(C {<printf>} {(SQ <'\\\\\\\\'>)})] spids: [525 527 535 -1] ) (case_arm pat_list: [ {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'>) (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\\\'> ) } {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'>) <Id.Lit_LBracket '['> <nftrb> <Id.Lit_RBracket ']'> } {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'>) <Id.Lit_ArrayLhsOpen 'u00['> <01> <Id.Lit_RBracket ']'> <Id.Lit_QMark '?'> } ] action: [ (C {<printf>} {<Id.Lit_Other '%'> <s>} { (DQ (braced_var_sub token: <Id.VSub_Name BASH_REMATCH> bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 1>}) ) ) } ) ] spids: [538 551 567 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (C {<printf>} {<Id.Lit_Other '%'> <b>} { (DQ (braced_var_sub token: <Id.VSub_Name BASH_REMATCH> bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 1>}) ) ) } ) ] spids: [570 571 -1 588] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tmp) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name BASH_REMATCH> bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 2>}) ) } spids: [591] ) ] ) ] ) ) (C {<printf>} {<Id.Lit_Other '%'> <s>} {(DQ ($ Id.VSub_DollarName '$tmp'))}) ] spids: [382 384 612 -1] ) (case_arm pat_list: [{<num> <Id.Lit_Star '*'>}] action: [ (C {<printf>} {<Id.Lit_Other '%'> <s>} { (DQ (braced_var_sub token: <Id.VSub_Name num_list> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.Binary op_id: Id.Arith_LBracket left: <Id.Lit_ArithVarLike rt> right: { (braced_var_sub token: <Id.VSub_Number 1> suffix_op: (suffix_op.Slice begin:{<Id.Lit_Digits 3>}) ) } ) ) ) ) } ) ] spids: [618 620 643 -1] ) (case_arm pat_list: [{<arr> <Id.Lit_Star '*'>}] action: [ (C {<local>} {<Id.Lit_VarLike 'array='> (sh_array_literal left: <Id.Op_LParen _> words: [ { (braced_var_sub token: <Id.VSub_Name arr_list> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.Binary op_id: Id.Arith_LBracket left: <Id.Lit_ArithVarLike rt> right: { (braced_var_sub token: <Id.VSub_Number 1> suffix_op: (suffix_op.Slice begin:{<Id.Lit_Digits 3>}) ) } ) ) ) } ] ) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Id.Arith_Bang child: { (braced_var_sub token: <Id.VSub_Name array> prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<printf>} {(DQ <'[]'>)})] spids: [670 685] ) ] else_action: [ (command.Sentence child: (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_PlusEqual left: <Id.Lit_ArithVarLike indent> right: {<Id.Lit_Digits 2>} ) ) terminator: <Id.Op_Semi _> ) (C {<printf>} {(DQ <'['> <Id.Lit_BadBackslash '\\'> <n>)}) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: { (braced_var_sub token: <Id.VSub_Name array> prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } right: {<Id.Lit_Digits 1>} ) ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.Sentence child: (C {<printf>} {(DQ <'%*s'>)} {(DQ ($ Id.VSub_DollarName '$indent'))}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<print>} {(DQ ($ Id.VSub_DollarName '$array'))}) terminator: <Id.Op_Semi _> ) (C {<printf>} {(DQ <','> <Id.Lit_BadBackslash '\\'> <n>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:array) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (DQ (braced_var_sub token: <Id.VSub_Name array> bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) suffix_op: (suffix_op.Slice begin:{<Id.Lit_Digits 1>}) ) ) } ] ) } spids: [760] ) ] ) ] ) ) (command.Sentence child: (C {<printf>} {(DQ <'%*s'>)} {(DQ ($ Id.VSub_DollarName '$indent'))}) terminator: <Id.Op_Semi _> ) (C {<print>} {(DQ ($ Id.VSub_DollarName '$array'))}) (C {<printf>} {(DQ <Id.Lit_BadBackslash '\\'> <'n%*s]'>)} { (DQ (word_part.ArithSub anode: (arith_expr.BinaryAssign op_id: Id.Arith_MinusEqual left: <Id.Lit_ArithVarLike indent> right: {<Id.Lit_Digits 2>} ) ) ) } ) ] ) ] spids: [646 648 815 -1] ) (case_arm pat_list: [{<obj> <Id.Lit_Star '*'>}] action: [ (C {<local>} {<Id.Lit_VarLike 'object='> (sh_array_literal left: <Id.Op_LParen _> words: [ { (braced_var_sub token: <Id.VSub_Name obj_list> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.Binary op_id: Id.Arith_LBracket left: <Id.Lit_ArithVarLike rt> right: { (braced_var_sub token: <Id.VSub_Number 1> suffix_op: (suffix_op.Slice begin:{<Id.Lit_Digits 3>}) ) } ) ) ) } ] ) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Id.Arith_Bang child: { (braced_var_sub token: <Id.VSub_Name object> prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<printf>} {(DQ <'{}'>)})] spids: [842 857] ) ] else_action: [ (command.Sentence child: (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_PlusEqual left: <Id.Lit_ArithVarLike indent> right: {<Id.Lit_Digits 2>} ) ) terminator: <Id.Op_Semi _> ) (C {<printf>} {(DQ <'{'> <Id.Lit_BadBackslash '\\'> <n>)}) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: { (braced_var_sub token: <Id.VSub_Name object> prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } right: {<Id.Lit_Digits 2>} ) ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.Sentence child: (C {<printf>} {(DQ <'%*s'>)} {(DQ ($ Id.VSub_DollarName '$indent'))}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<print>} {(DQ ($ Id.VSub_DollarName '$object'))}) terminator: <Id.Op_Semi _> ) (C {<printf>} {(DQ <': '>)}) (command.Sentence child: (C {<print>} { (DQ (braced_var_sub token: <Id.VSub_Name object> bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 1>}) ) ) } ) terminator: <Id.Op_Semi _> ) (C {<printf>} {(DQ <','> <Id.Lit_BadBackslash '\\'> <n>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:object) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (DQ (braced_var_sub token: <Id.VSub_Name object> bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) suffix_op: (suffix_op.Slice begin:{<Id.Lit_Digits 2>}) ) ) } ] ) } spids: [951] ) ] ) ] ) ) (command.Sentence child: (C {<printf>} {(DQ <'%*s'>)} {(DQ ($ Id.VSub_DollarName '$indent'))}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<print>} {(DQ ($ Id.VSub_DollarName '$object'))}) terminator: <Id.Op_Semi _> ) (C {<printf>} {(DQ <': '>)}) (command.Sentence child: (C {<print>} { (DQ (braced_var_sub token: <Id.VSub_Name object> bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 1>}) ) ) } ) terminator: <Id.Op_Semi _> ) (C {<printf>} {(DQ <Id.Lit_BadBackslash '\\'> <n>)}) (C {<printf>} {(DQ <'%*s}'>)} { (DQ (word_part.ArithSub anode: (arith_expr.BinaryAssign op_id: Id.Arith_MinusEqual left: <Id.Lit_ArithVarLike indent> right: {<Id.Lit_Digits 2>} ) ) ) } ) ] ) ] spids: [818 820 1032 -1] ) ] ) ) (command.ForEach iter_names: [arg] iterable: (for_iter.Args) body: (command.DoGroup children: [ (command.Case to_match: {($ Id.VSub_DollarName '$arg')} arms: [ (case_arm pat_list: [{<obj> <Id.Lit_Star '*'>}] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobEqual left: {($ Id.VSub_DollarName '$json')} right: {<obj> <Id.Lit_Other '*'>} ) ) (BraceGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:json) op: assign_op.Equal rhs: {<null>} spids: [1077] ) ] ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Break break>) terminator: <Id.Op_Semi _> ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:json) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name obj_list> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.Binary op_id: Id.Arith_LBracket left: <Id.Lit_ArithVarLike rt> right: { (braced_var_sub token: <Id.VSub_Name json> suffix_op: (suffix_op.Slice begin:{<Id.Lit_Digits 3>}) ) } ) ) ) } spids: [1087] ) (assign_pair lhs: (sh_lhs_expr.Name name:object) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [{($ Id.VSub_DollarName '$json')}] ) } spids: [1102] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: { (braced_var_sub token: <Id.VSub_Name object> prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobEqual left: { (braced_var_sub token: <Id.VSub_Name str_list> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.Binary op_id: Id.Arith_LBracket left: <Id.Lit_ArithVarLike rt> right: { (braced_var_sub token: <Id.VSub_Name object> suffix_op: (suffix_op.Slice begin: {<Id.Lit_Digits 3>} ) ) } ) ) ) } right: { (DQ (braced_var_sub token: <Id.VSub_Name arg> suffix_op: (suffix_op.Slice begin: {<Id.Lit_Digits 5>} ) ) ) } ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:json) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name object> bracket_op: (bracket_op.ArrayIndex expr: {<Id.Lit_Digits 1>} ) ) } spids: [1159] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Continue continue> arg_word: {<2>} ) ] spids: [1125 1156] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:object) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (DQ (braced_var_sub token: <Id.VSub_Name object> bracket_op: (bracket_op.WholeArray op_id: Id.Lit_At ) suffix_op: (suffix_op.Slice begin: {<Id.Lit_Digits 2>} ) ) ) } ] ) } spids: [1175] ) ] ) ] ) ] ) ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:json) op: assign_op.Equal rhs: {<null>} spids: [1196] ) ] ) terminator: <Id.Op_Semi _> ) (command.ControlFlow token:<Id.ControlFlow_Break break>) ] spids: [1058 1060 1202 -1] ) (case_arm pat_list: [{<arr> <Id.Lit_Star '*'>}] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobEqual left: {($ Id.VSub_DollarName '$json')} right: {<arr> <Id.Lit_Other '*'>} ) ) (BraceGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:json) op: assign_op.Equal rhs: {<null>} spids: [1224] ) ] ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Break break>) terminator: <Id.Op_Semi _> ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:json) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name arr_list> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.Binary op_id: Id.Arith_LBracket left: <Id.Lit_ArithVarLike rt> right: { (braced_var_sub token: <Id.VSub_Name json> suffix_op: (suffix_op.Slice begin:{<Id.Lit_Digits 3>}) ) } ) ) ) } spids: [1234] ) (assign_pair lhs: (sh_lhs_expr.Name name:array) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [{($ Id.VSub_DollarName '$json')}] ) } spids: [1249] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_GreatEqual left: { (braced_var_sub token: <Id.VSub_Name array> prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } right: { (braced_var_sub token: <Id.VSub_Name arg> suffix_op: (suffix_op.Slice begin:{<Id.Lit_Digits 5>}) ) } ) ) (BraceGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:json) op: assign_op.Equal rhs: {<null>} spids: [1279] ) ] ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Break break>) terminator: <Id.Op_Semi _> ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:json) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name array> bracket_op: (bracket_op.ArrayIndex expr: { (braced_var_sub token: <Id.VSub_Name arg> suffix_op: (suffix_op.Slice begin:{<Id.Lit_Digits 5>}) ) } ) ) } spids: [1289] ) ] ) ] spids: [1205 1207 1301 -1] ) ] ) ] ) ) (command.CommandList children: [ (command.Sentence child: (C {<print>} {(DQ ($ Id.VSub_DollarName '$json'))}) terminator: <Id.Op_Semi _> ) (C {<echo>}) ] ) ] )