(command.CommandList children: [ (command.ShFunction name: columnize body: (BraceGroup children: [ (C {<typeset>} {<-i>} {<Id.Lit_VarLike 'displaywidth='> (braced_var_sub token: <Id.VSub_Number 1> suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:{<80>}) ) } ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DPipe] children: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Less left: {($ Id.VSub_Pound '$#')} right: {<Id.Lit_Digits 2>} ) ) (C {<typeset>} {<Id.Lit_VarLike 'colsep='> (SQ <' '>)}) (C {<typeset>} {<Id.Lit_VarLike 'colsep='> (DQ ($ Id.VSub_Number '$2'))}) ] ) (C {<typeset>} {<-i>} {<Id.Lit_VarLike 'list_size='> (braced_var_sub token: <Id.VSub_Name list> prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: <Id.Lit_ArithVarLike list_size> right: {<Id.Lit_Digits 0>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:columnized) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <'<empty>'>)}])} spids: [156] ) ] ) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] spids: [140 153] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: {<Id.Lit_Digits 1>} right: <Id.Lit_ArithVarLike list_size> ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:columnized) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (DQ (braced_var_sub token: <Id.VSub_Name list> bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>}) ) ) } ] ) } spids: [185] ) ] ) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] spids: [170 182] ) ] ) (C {<typeset>} {<-i>} {<Id.Lit_VarLike 'nrows='> <0>}) (C {<typeset>} {<-i>} {<Id.Lit_VarLike 'ncols='> <0>}) (C {<typeset>} {<-a>} {<Id.Lit_VarLike 'colwidths='> (sh_array_literal left:<Id.Op_LParen _>)} ) (C {<typeset>} {<-i>} {<Id.Lit_VarLike 'i='> <0>}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike i> right: {<Id.Lit_Digits 0>} ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: <Id.Lit_ArithVarLike i> right: <Id.Lit_ArithVarLike list_size> ) update: (arith_expr.UnaryAssign op_id:Id.Node_PostDPlus child:<Id.Lit_ArithVarLike i>) body: (command.DoGroup children: [ (C {<typeset>} {<-a>} {<Id.Lit_VarLike 'colwidths='> (sh_array_literal left:<Id.Op_LParen _>)} ) (command.DParen child: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: <Id.Lit_ArithVarLike nrows> ) ) (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike ncols> right: (arith_expr.Binary op_id: Id.Arith_Slash left: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.Binary op_id: Id.Arith_Plus left: <Id.Lit_ArithVarLike list_size> right: <Id.Lit_ArithVarLike nrows> ) right: {<Id.Lit_Digits 1>} ) right: <Id.Lit_ArithVarLike nrows> ) ) ) (C {<typeset>} {<-i>} {<Id.Lit_VarLike 'totwidth='> <-> (braced_var_sub token: <Id.VSub_Name colsep> prefix_op: (Id.VSub_Pound) ) } ) (C {<typeset>} {<-i>} {<col>}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike col> right: {<Id.Lit_Digits 0>} ) cond: (arith_expr.Binary op_id: Id.Arith_LessEqual left: <Id.Lit_ArithVarLike col> right: (arith_expr.Binary op_id: Id.Arith_Minus left: <Id.Lit_ArithVarLike ncols> right: {<Id.Lit_Digits 1>} ) ) update: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: <Id.Lit_ArithVarLike col> ) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:colwidth) op: assign_op.Equal rhs: {<0>} spids: [366] ) ] ) (C {<typeset>} {<-i>} {<row>}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike row> right: {<Id.Lit_Digits 0>} ) cond: (arith_expr.Binary op_id: Id.Arith_LessEqual left: <Id.Lit_ArithVarLike row> right: (arith_expr.Binary op_id: Id.Arith_Minus left: <Id.Lit_ArithVarLike nrows> right: {<Id.Lit_Digits 1>} ) ) update: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: <Id.Lit_ArithVarLike row> ) body: (command.DoGroup children: [ (C {<typeset>} {<-i>} {<j>}) (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike j> right: (arith_expr.Binary op_id: Id.Arith_Plus left: <Id.Lit_ArithVarLike row> right: (arith_expr.Binary op_id: Id.Arith_Star left: <Id.Lit_ArithVarLike nrows> right: <Id.Lit_ArithVarLike col> ) ) ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_GreatEqual left: <Id.Lit_ArithVarLike j> right: <Id.Lit_ArithVarLike list_size> ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] spids: [429 441] ) ] ) (C {<typeset>} {<Id.Lit_VarLike 'item='> (DQ (braced_var_sub token: <Id.VSub_Name list> bracket_op: (bracket_op.ArrayIndex expr: <Id.Lit_ArithVarLike j> ) ) ) } ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Less left: <Id.Lit_ArithVarLike colwidth> right: { (braced_var_sub token: <Id.VSub_Name item> prefix_op: (Id.VSub_Pound) ) } ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:colwidth) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name item> prefix_op: (Id.VSub_Pound) ) } spids: [477] ) ] ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:colwidths) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [{($ Id.VSub_DollarName '$colwidth')}] ) } spids: [487] ) ] ) (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_PlusEqual left: <Id.Lit_ArithVarLike totwidth> right: (arith_expr.Binary op_id: Id.Arith_Plus left: <Id.Lit_ArithVarLike colwidth> right: { (braced_var_sub token: <Id.VSub_Name colsep> prefix_op: (Id.VSub_Pound) ) } ) ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: <Id.Lit_ArithVarLike totwidth> right: <Id.Lit_ArithVarLike displaywidth> ) ) terminator: <Id.Op_Semi _> ) ] ) action: [(command.ControlFlow token:<Id.ControlFlow_Break break>)] spids: [508 520] ) ] ) ] ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_LessEqual left: <Id.Lit_ArithVarLike totwidth> right: <Id.Lit_ArithVarLike displaywidth> ) ) terminator: <Id.Op_Semi _> ) ] ) action: [(command.ControlFlow token:<Id.ControlFlow_Break break>)] spids: [532 544] ) ] ) ] ) ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike row> right: {<Id.Lit_Digits 0>} ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: <Id.Lit_ArithVarLike row> right: <Id.Lit_ArithVarLike nrows> ) update: (arith_expr.UnaryAssign op_id:Id.Node_PostDPlus child:<Id.Lit_ArithVarLike row>) body: (command.DoGroup children: [ (C {<typeset>} {<-i>} {<Id.Lit_VarLike 'text_size='> <0>}) (C {<typeset>} {<-a>} {<Id.Lit_VarLike 'texts='> (sh_array_literal left:<Id.Op_LParen _>)} ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike col> right: {<Id.Lit_Digits 0>} ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: <Id.Lit_ArithVarLike col> right: <Id.Lit_ArithVarLike ncols> ) update: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: <Id.Lit_ArithVarLike col> ) body: (command.DoGroup children: [ (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike i> right: (arith_expr.Binary op_id: Id.Arith_Plus left: <Id.Lit_ArithVarLike row> right: (arith_expr.Binary op_id: Id.Arith_Star left: <Id.Lit_ArithVarLike nrows> right: <Id.Lit_ArithVarLike col> ) ) ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_GreatEqual left: <Id.Lit_ArithVarLike i> right: <Id.Lit_ArithVarLike list_size> ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:item) op: assign_op.Equal rhs: {(SQ )} spids: [664] ) ] ) ] spids: [649 661] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:item) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: <Id.VSub_Name list> bracket_op: (bracket_op.ArrayIndex expr: <Id.Lit_ArithVarLike i> ) ) ) } spids: [672] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: texts index: {($ Id.VSub_DollarName '$text_size')} ) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$item'))} spids: [688] ) ] ) (command.DParen child: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: <Id.Lit_ArithVarLike text_size> ) ) ] ) ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: <Id.Lit_ArithVarLike text_size> right: {<Id.Lit_Digits 0>} ) ) (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { (braced_var_sub token: <Id.VSub_Name texts> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.Binary op_id: Id.Arith_Minus left: <Id.Lit_ArithVarLike text_size> right: {<Id.Lit_Digits 1>} ) ) ) } right: {(SQ )} ) ) ] ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.DParen child: (arith_expr.UnaryAssign op_id: Id.Node_PostDMinus child: <Id.Lit_ArithVarLike text_size> ) ) (C {<unset>} {<Id.Lit_ArrayLhsOpen 'texts['> ($ Id.VSub_DollarName '$text_size') <Id.Lit_RBracket ']'> } ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:text_row) op: assign_op.Equal rhs: {(SQ )} spids: [764] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:text_cell) op: assign_op.Equal rhs: {(SQ )} spids: [769] ) ] ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike col> right: {<Id.Lit_Digits 0>} ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: <Id.Lit_ArithVarLike col> right: <Id.Lit_ArithVarLike text_size> ) update: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: <Id.Lit_ArithVarLike col> ) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fmt) op: assign_op.Equal rhs: { (DQ <'%-'> (braced_var_sub token: <Id.VSub_Name colwidths> bracket_op: (bracket_op.ArrayIndex expr: <Id.Lit_ArithVarLike col> ) ) <s> ) } spids: [798] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:text_cell) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<printf>} {($ Id.VSub_DollarName '$fmt')} { (DQ (braced_var_sub token: <Id.VSub_Name texts> bracket_op: (bracket_op.ArrayIndex expr: <Id.Lit_ArithVarLike col> ) ) ) } ) ) } spids: [811] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:text_row) op: assign_op.PlusEqual rhs: {(DQ (${ Id.VSub_Name text_cell))} spids: [828] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_NEqual left: <Id.Lit_ArithVarLike col> right: (arith_expr.Binary op_id: Id.Arith_Minus left: <Id.Lit_ArithVarLike text_size> right: {<Id.Lit_Digits 1>} ) ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:text_row) op: assign_op.PlusEqual rhs: {(DQ (${ Id.VSub_Name colsep))} spids: [849] ) ] ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:columnized) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [{(DQ ($ Id.VSub_DollarName '$text_row'))}] ) } spids: [860] ) ] ) ] ) ) ] ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_Number '$0')} right: { (braced_var_sub token: <Id.VSub_Name BASH_SOURCE> bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>}) ) } ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShFunction name: print_columns body: (BraceGroup children: [ (C {<unset>} {<columnized>}) (C {<typeset>} {<-a>} {<columnized>}) (C {<typeset>} {<-a>} {<list>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:list) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [{($ Id.VSub_Number '$1')}] ) } spids: [926] ) ] ) (C {<columnize>} {($ Id.VSub_Number '$2')} {($ Id.VSub_Number '$3')}) (C {<typeset>} {<-i>} {<i>}) (C {<echo>} {(SQ <'==============='>)}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike i> right: {<Id.Lit_Digits 0>} ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: <Id.Lit_ArithVarLike i> right: { (braced_var_sub token: <Id.VSub_Name columnized> prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) update: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: <Id.Lit_ArithVarLike i> ) body: (command.DoGroup children: [ (C {<printf>} { (DQ (braced_var_sub token: <Id.VSub_Name columnized> bracket_op: (bracket_op.ArrayIndex expr: {($ Id.VSub_DollarName '$i')} ) ) <Id.Lit_BadBackslash '\\'> <n> ) } ) ] ) ) ] ) ) (C {<print_columns>}) (C {<print_columns>} {(SQ )}) (C {<print_columns>} {<oneitem>}) (C {<print_columns>} {(SQ <'a 2 c'>)} {<10>} {(SQ <', '>)}) (C {<print_columns>} { (SQ <' one two three\n'> <' 4ne 5wo 6hree\n'> <' 7ne 8wo 9hree\n'> <' 10e 11o 12ree'>) } {<18>} ) (C {<print_columns>} {(SQ <' 1 two three\n'> <' for 5 six\n'> <' 7 8'>)} {<12>}) (C {<print_columns>} {(SQ <' 1 two 3\n'> <' for 5 six\n'> <' 7 8'>)} {<12>}) ] spids: [873 892] ) ] ) ] )