(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SHQL_ROOT spids:[19]) op: Equal rhs: {(DQ (/u/shql))} spids: [19] ) ] spids: [19] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:EDITOR spids:[27]) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name EDITOR> suffix_op: (StringUnary op_id: VTest_ColonEquals arg_word: {(Lit_Slash /) (usr) (Lit_Slash /) (bin) (Lit_Slash /) (vi)} ) spids: [29 38] ) ) } spids: [27] ) ] spids: [27] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SHELL spids:[44]) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name SHELL> suffix_op: (StringUnary op_id: VTest_ColonEquals arg_word: {(Lit_Slash /) (bin) (Lit_Slash /) (sh)} ) spids: [46 53] ) ) } spids: [44] ) ] spids: [44] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:AWK spids:[59]) op:Equal rhs:{(mawk)} spids:[59])] spids: [59] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:DEBUG spids:[67]) op:Equal rhs:{(DQ (N))} spids:[67])] spids: [67] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$DEBUG'))} {(Lit_Other '=')} {(DQ (Y))} {(Lit_Other ']')}) (C {(set)} {(-x)}) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:UMASK spids:[102]) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(umask)})]) left_token: <Left_Backtick '`'> spids: [103 105] ) } spids: [102] ) ] spids: [102] ) (C {(umask)} {(0000)}) (C {(trap)} { (DQ ('echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (Goodbye) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' ; ') (' rm -f /tmp/') ($ VSub_Dollar '$$') (' /tmp/') ($ VSub_Dollar '$$') ('row /tmp/') ($ VSub_Dollar '$$') ('join*') ) } {(0)} {(1)} {(2)} {(3)} {(15)} ) (C {(set)} {(-h)}) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [(C {(echo)} {(SQ <'\\c'>)}) (C {(grep)} {(-s)} {(c)})] negated: F ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NOCR1 spids:[174]) op: Equal rhs: {(SQ <-n>)} spids: [174] ) ] spids: [174] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NOCR2 spids:[183]) op: Equal rhs: {(DQ )} spids: [183] ) ] spids: [183] ) ] spids: [16777215 168] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:NOCR1 spids:[190]) op:Equal rhs:{(DQ )} spids:[190])] spids: [190] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NOCR2 spids:[198]) op: Equal rhs: {(SQ <'\\c'>)} spids: [198] ) ] spids: [198] ) ] spids: [187 203] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:NL spids:[205]) op:Equal rhs:{(SQ <'\n'>)} spids:[205])] spids: [205] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:TAB spids:[210]) op:Equal rhs:{(SQ <'\t'>)} spids:[210])] spids: [210] ) (C {(export)} {(_IFS)} {(TABLE)} {(CMD)} {(NOCR1)} {(NOCR2)} {(NL)} {(TAB)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_IFS spids:[231]) op: Equal rhs: {(DQ ($ VSub_Name '$IFS'))} spids: [231] ) ] spids: [231] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (X-q))} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:QUIET spids:[257]) op: Equal rhs: {(DQ (Y))} spids: [257] ) ] spids: [257] ) (C {(shift)}) ] spids: [16777215 255] ) ] spids: [16777215 265] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (X))} {(Lit_Other ']')} ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ('Missing database name.'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (SimpleCommand words: [ {(echo)} {(DQ ('The database name must be a directory under ') ($ VSub_Name '$HOME') (/shql))} ] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (SimpleCommand words: [{(echo)} {(DQ ('\tor a directory under ') ($ VSub_Name '$SHQL_ROOT'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 285] ) ] spids: [16777215 324] ) (C {(echo)} {(DQ ('Database: ') ($ VSub_Number '$1'))}) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(-d)} {($ VSub_Name '$HOME') (/shql/) ($ VSub_Number '$1')} {(Lit_Other ']')} ) ] action: [(C {(cd)} {($ VSub_Name '$HOME') (/shql/) ($ VSub_Number '$1')})] spids: [16777215 346] ) (if_arm cond: [ (C {(Lit_Other '[')} {(-d)} {($ VSub_Name '$SHQL_ROOT') (/) ($ VSub_Number '$1')} {(Lit_Other ']')} ) ] action: [(C {(cd)} {($ VSub_Name '$SHQL_ROOT') (/) ($ VSub_Number '$1')})] spids: [354 366] ) (if_arm cond: [ (C {(Lit_Other '[')} {(-d)} {($ VSub_Name '$HOME') (/) ($ VSub_Number '$1')} {(Lit_Other ']')} ) ] action: [(C {(cd)} {($ VSub_Name '$HOME') (/) ($ VSub_Number '$1')})] spids: [374 386] ) (if_arm cond: [(C {(Lit_Other '[')} {(-d)} {($ VSub_Number '$1')} {(Lit_Other ']')})] action: [(C {(cd)} {($ VSub_Number '$1')})] spids: [394 404] ) ] else_action: [ (SimpleCommand words: [{(echo)} {(DQ ('Unknown database (') ($ VSub_Number '$1') (')'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (SimpleCommand words: [ {(echo)} {(DQ ('The database name must be a directory under ') ($ VSub_Name '$HOME') (/shql))} ] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (SimpleCommand words: [{(echo)} {(DQ ('\tor a directory under ') ($ VSub_Name '$SHQL_ROOT'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [410 451] ) (FuncDef name: syntax body: (BraceGroup children: [ (Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(create)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(DQ (END))} here_end_span_id: 500 stdin_parts: [ ('CREATE TABLE table_name (\n') ('\tcolumn_name column_width \n') ('\t{, ...} \n') (') \t\n') ('or\n') ('CREATE VIEW view_name (\n') ('\ttable_or_view1.column1 = table_or_view2.column2\n') (')\n') ] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [482 483 505 16777215] ) (case_arm pat_list: [{(delete)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(DQ (END))} here_end_span_id: 521 stdin_parts: [ ('DELETE \n') ('FROM table_name\t\n') ('{ WHERE where_clause }\n') ] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [508 509 526 16777215] ) (case_arm pat_list: [{(drop)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(DQ (END))} here_end_span_id: 542 stdin_parts: [('DROP TABLE table_name\n') ('or\n') ('DROP VIEW view_name\n')] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [529 530 547 16777215] ) (case_arm pat_list: [{(edit)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(DQ (END))} here_end_span_id: 562 stdin_parts: [ ('EDIT table_name\n') ( "is a non-standard method of changing a table's field names or display widths.\n" ) ] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [550 551 567 16777215] ) (case_arm pat_list: [{(help)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(DQ (END))} here_end_span_id: 592 stdin_parts: [ ('HELP ALL\n') ('or\n') ('HELP TABLES \n') ('or\n') ('HELP VIEWS\n') ('or\n') ('HELP COMMANDS\n') ('or\n') ( 'HELP [CREATE | DELETE | DROP | INSERT | SELECT | UPDATE | WHERE | PRINT | EDIT]\n' ) ('or\n') ('HELP table_name\n') ('Commands must appear in lower case.\n') ] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [570 571 597 16777215] ) (case_arm pat_list: [{(insert)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(DQ (END))} here_end_span_id: 617 stdin_parts: [ ('INSERT INTO table_name \n') ('\t{ ( column_name, ... ) }\n') ('VALUES ( expression, ...)\n') ('or\t\t\n') ('INSERT INTO table_name \n') ('\t{ ( column_name, ... ) }\n') ('subselect\n') ] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [600 601 622 16777215] ) (case_arm pat_list: [{(print)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(DQ (END))} here_end_span_id: 637 stdin_parts: [ ('PRINT table_name \n') ('is a non-standard synonym for SELECT * FROM table_name.\n') ] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [625 626 642 16777215] ) (case_arm pat_list: [{(select)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(DQ (END))} here_end_span_id: 662 stdin_parts: [ ('SELECT { DISTINCT } \n') ('\t[ column_name {,...} | * ]\n') ('FROM [ table_name | view_name ]\n') ('{ WHERE where_clause }\n') ('{ ORDER BY column_name { NUM } { ASC | DESC } {, ... }\n') ('{ UNION select statement }\n') ("'NUM' is a non-standard method for sorting numeric fields.\n") ] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [645 646 667 16777215] ) (case_arm pat_list: [{(update)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(DQ (END))} here_end_span_id: 683 stdin_parts: [ ('UPDATE table_name\n') ('SET column_name = expression {, ... }\n') ('{ WHERE where_clause }\n') ] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [670 671 688 16777215] ) (case_arm pat_list: [{(where)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(DQ (END))} here_end_span_id: 704 stdin_parts: [ ( 'WHERE [ column_name | value ] [ =, !=, >, <, >=, <=, and, or, not, in ]\n' ) (' [ column_name | value | subselect ]\n') ('Parentheses may be used to group expressions. \n') ] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [691 692 709 16777215] ) (case_arm pat_list: [{(syntax)}] action: [ (Sentence child: (C {(syntax)} {(commands)}) terminator: <Op_Semi ';'> ) (C {(echo)}) (Sentence child: (C {(syntax)} {(create)}) terminator: <Op_Semi ';'> ) (C {(echo)}) (Sentence child: (C {(syntax)} {(delete)}) terminator: <Op_Semi ';'> ) (C {(echo)}) (Sentence child: (C {(syntax)} {(drop)}) terminator: <Op_Semi ';'> ) (C {(echo)}) (Sentence child: (C {(syntax)} {(insert)}) terminator: <Op_Semi ';'> ) (C {(echo)}) (Sentence child: (C {(syntax)} {(select)}) terminator: <Op_Semi ';'> ) (C {(echo)}) (Sentence child: (C {(syntax)} {(update)}) terminator: <Op_Semi ';'> ) (C {(echo)}) (Sentence child: (C {(syntax)} {(where)}) terminator: <Op_Semi ';'> ) (C {(echo)}) (Sentence child: (C {(syntax)} {(print)}) terminator: <Op_Semi ';'> ) (C {(echo)}) (Sentence child: (C {(syntax)} {(edit)}) terminator: <Op_Semi ';'> ) (C {(echo)}) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [712 713 800 16777215] ) ] spids: [473 479 803] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [470] ) spids: [467 470] ) (FuncDef name: lookup_field body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {($ VSub_Name '$TABLE') (Lit_Other '%')} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RESULT spids:[847]) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(grep)} {(-n)} {(EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (Lit_Other '^') ($ VSub_Number '$1') } {(EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)} {($ VSub_Name '$TABLE') (Lit_Other '@')} ) ] ) left_token: <Left_Backtick '`'> spids: [849 862] ) ) } spids: [847] ) ] spids: [847] ) ] spids: [16777215 845] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RESULT spids:[868]) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(grep)} {(-n)} {(EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (Lit_Other '^') ($ VSub_Number '$1') } {(EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)} {($ VSub_Name '$TABLE') (Lit_Other '@')} ) (C {(sed)} {(1q)}) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [870 889] ) ) } spids: [868] ) ] spids: [868] ) ] spids: [866 893] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$RESULT'))} {(Lit_Other ']')}) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:OUTFIELD spids:[912]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [912] ) ] spids: [912] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [16777215 910] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:OUTFIELDNUM spids:[925]) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ ($ VSub_Name '$RESULT'))} {(Lit_Other ':')} {(SQ <'\\([^:]*\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [927 939] ) ) } spids: [925] ) ] spids: [925] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:OUTFIELD spids:[943]) op: Equal rhs: { (DQ (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ($ VSub_Name '$OUTFIELDNUM') ) } spids: [943] ) ] spids: [943] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [923 956] ) ] spids: [828] ) spids: [825 828] ) (FuncDef name: do_aggreg body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(SQ <Xsum>)} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:AGGREG spids:[999]) op: Equal rhs: {(SQ <total>)} spids: [999] ) ] spids: [999] ) ] spids: [16777215 997] ) (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(SQ <Xavg>)} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:AGGREG spids:[1025]) op: Equal rhs: {(SQ <'(total/cnt)'>)} spids: [1025] ) ] spids: [1025] ) ] spids: [1005 1023] ) (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(SQ <Xcount>)} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:AGGREG spids:[1051]) op: Equal rhs: {(SQ <cnt>)} spids: [1051] ) ] spids: [1051] ) ] spids: [1031 1049] ) (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(SQ <Xmin>)} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:AGGREG spids:[1077]) op: Equal rhs: {(SQ <min>)} spids: [1077] ) ] spids: [1077] ) ] spids: [1057 1075] ) (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(SQ <Xmax>)} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:AGGREG spids:[1103]) op: Equal rhs: {(SQ <max>)} spids: [1103] ) ] spids: [1103] ) ] spids: [1083 1101] ) ] else_action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})] spids: [1109 1116] ) (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$2'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X('))} {(-o)} {(DQ (X) ($ VSub_Number '$4'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X)'))} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ('Bad aggregate syntax'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(syntax)} {(select)}) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:AGGFIELD spids:[1175]) op: Equal rhs: {(DQ ($ VSub_Number '$3'))} spids: [1175] ) ] spids: [1175] ) (C {(shift)} {(4)}) (C {(lookup_field)} {(DQ ($ VSub_Name '$AGGFIELD'))}) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')}) (SimpleCommand words: [{(echo)} {(DQ ('Bad field name (') ($ VSub_Number '$1') (')'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) (WhileUntil keyword: <KW_While while> cond: [(C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-ne)} {(0)} {(Lit_Other ']')})] body: (DoGroup children: [ (Sentence child: (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xwhere))} {(Lit_Other ']')} ) (ControlFlow token:<ControlFlow_Break break>) ] ) terminator: <Op_Semi ';'> ) (Sentence child: (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xorder))} {(Lit_Other ']')} ) (ControlFlow token:<ControlFlow_Break break>) ] ) terminator: <Op_Semi ';'> ) (Sentence child: (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xunion))} {(Lit_Other ']')} ) (ControlFlow token:<ControlFlow_Break break>) ] ) terminator: <Op_Semi ';'> ) (C {(shift)}) ] spids: [1238 1308] ) ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:OUTFIELD spids:[1312]) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (Subshell child: (CommandList children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SUBSELECT spids:[1316]) op: Equal rhs: {(DQ (Y))} spids: [1316] ) ] spids: [1316] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:AGGREGATE spids:[1323]) op: Equal rhs: {(DQ (Y))} spids: [1323] ) ] spids: [1323] ) terminator: <Op_Semi ';'> ) (C {(select_)} {(DQ (select))} {(DQ ($ VSub_Name '$AGGFIELD'))} {(DQ (from))} {(DQ ($ VSub_Name '$TABLE'))} {(DQ ($ VSub_At '$@'))} ) ] ) spids: [1314 1352] ) (C {($ VSub_Name '$AWK')} {(-F) (DQ ('\t'))} { (SQ <'NR == 1 { min = $1; max = $1 }\n'> <'\t\t\t { cnt += 1; total += $1 }\n'> <'\t\t$1 < min { min = $1 }\n'> <'\t\t$1 > max { max = $1 }\n'> <'\t\tEND\t { printf "%s%s%s", "\\"", '> ) ($ VSub_Name '$AGGREG') (SQ <', "\\"" }'>) } ) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [1313 1378] ) } spids: [1312] ) ] spids: [1312] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ ($ VSub_Name '$RESULT'))} {(Lit_Other ':')} {(SQ <'[^\t]*\t\\(.*\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [1385 1397] ) } {(-lt)} {(10)} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RESULT spids:[1408]) op: Equal rhs: {(DQ ($ VSub_Name '$AGGFIELD') ('\t10'))} spids: [1408] ) ] spids: [1408] ) ] spids: [16777215 1406] ) ] spids: [16777215 1415] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [976] ) spids: [973 976] ) (FuncDef name: do_join body: (BraceGroup children: [ (C {(update_view)} {(DQ ($ VSub_Number '$1'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE spids:[1450]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [1450] ) ] spids: [1450] ) (C {(lookup_field)} {(DQ ($ VSub_Number '$2'))}) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')}) (SimpleCommand words: [ {(echo)} { (DQ ('Bad view specifcation (') ($ VSub_Number '$1') (.) ($ VSub_Number '$2') (')')) } ] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:JFIELD1 spids:[1498]) op: Equal rhs: {(DQ ($ VSub_Name '$OUTFIELDNUM'))} spids: [1498] ) ] spids: [1498] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:JFIELD1L1 spids:[1504]) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(expr)} {($ VSub_Name '$JFIELD1')} {(-)} {(1)})] ) left_token: <Left_Backtick '`'> spids: [1506 1514] ) ) } spids: [1504] ) ] spids: [1504] ) (C {(update_view)} {(DQ ($ VSub_Number '$3'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE spids:[1525]) op: Equal rhs: {(DQ ($ VSub_Number '$3'))} spids: [1525] ) ] spids: [1525] ) (C {(lookup_field)} {(DQ ($ VSub_Number '$4'))}) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')}) (SimpleCommand words: [ {(echo)} { (DQ ('Bad view specifcation (') ($ VSub_Number '$3') (.) ($ VSub_Number '$4') (')')) } ] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:JFIELD2 spids:[1573]) op: Equal rhs: {(DQ ($ VSub_Name '$OUTFIELDNUM'))} spids: [1573] ) ] spids: [1573] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:JFIELD2L1 spids:[1579]) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(expr)} {($ VSub_Name '$JFIELD2')} {(-)} {(1)})] ) left_token: <Left_Backtick '`'> spids: [1581 1589] ) ) } spids: [1579] ) ] spids: [1579] ) (Subshell child: (CommandList children: [ (Sentence child: (C {(grep)} {(DQ ('^') ($ VSub_Number '$2') ('\t'))} {($ VSub_Number '$1') (Lit_Other '@')} ) terminator: <Op_Semi ';'> ) (Sentence child: (C {(grep)} {(-v)} {(DQ ('^') ($ VSub_Number '$2') ('\t'))} {($ VSub_Number '$1') (Lit_Other '@')} ) terminator: <Op_Semi ';'> ) (C {(grep)} {(-v)} {(DQ ('^') ($ VSub_Number '$4') ('\t'))} {($ VSub_Number '$3') (Lit_Other '@')} ) ] ) redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_Number '$5') (Lit_Other '@')} ) ] spids: [1594 1639] ) (SimpleCommand words: [ {(sort)} {(-t) (EscapedLiteralPart token:<Lit_EscapedChar '\\\t'>)} {(Lit_Other '+') ($ VSub_Name '$JFIELD2L1')} {($ VSub_Number '$3') (Lit_TildeLike '~')} ] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/tmp/) ($ VSub_Dollar '$$')} ) ] ) (Pipeline children: [ (C {(sort)} {(-t) (EscapedLiteralPart token:<Lit_EscapedChar '\\\t'>)} {(Lit_Other '+') ($ VSub_Name '$JFIELD1L1')} {($ VSub_Number '$1') (Lit_TildeLike '~')} ) (SimpleCommand words: [ {(join)} {(-t) (EscapedLiteralPart token:<Lit_EscapedChar '\\\t'>)} {(-j1)} {($ VSub_Name '$JFIELD1')} {(-j2)} {($ VSub_Name '$JFIELD2')} {(-)} {(/tmp/) ($ VSub_Dollar '$$')} ] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_Number '$5') (Lit_TildeLike '~')} ) ] ) ] negated: F ) ] spids: [1440] ) spids: [1437 1440] ) (FuncDef name: update_view body: (BraceGroup children: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Number '$1') ('%'))} {(Lit_Other ']')} ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) (Subshell child: (C {(do_join)} { (CommandSubPart command_list: (CommandList children: [(C {(cat)} {($ VSub_Number '$1') (Lit_Other '%')})] ) left_token: <Left_Backtick '`'> spids: [1749 1754] ) } ) spids: [1745 1756] ) ] spids: [1722] ) spids: [1719 1722] ) (FuncDef name: where body: (BraceGroup children: [ (C {(shift)}) (WhileUntil keyword: <KW_While while> cond: [ (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-gt)} {(0)} {(-a)} {(DQ ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (order))} {(-a)} {(DQ ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (union))} {(Lit_Other ']')} ) ] body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xselect))} {(Lit_Other ']')} ) ] action: [ (C {(set)} {(X)} { (CommandSubPart command_list: (CommandList children: [ (Subshell child: (CommandList children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SUBSELECT spids:[1852]) op: Equal rhs: {(DQ (Y))} spids: [1852] ) ] spids: [1852] ) terminator: <Op_Semi ';'> ) (C {(select_)} {(DQ ($ VSub_At '$@'))}) ] ) spids: [1850 1863] ) ] ) left_token: <Left_Backtick '`'> spids: [1849 1864] ) } ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-eq)} {(0)} {(Lit_Other ']')} ) ] action: [(C {(shift)})] spids: [16777215 1882] ) ] else_action: [ (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] spids: [1887 1894] ) ] spids: [16777215 1842] ) ] spids: [16777215 1897] ) (Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(and)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE spids:[1912]) op: Equal rhs: {(DQ ($ VSub_Name '$WHERE') (' && '))} spids: [1912] ) ] spids: [1912] ) ] spids: [1909 1910 1917 16777215] ) (case_arm pat_list: [{(or)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE spids:[1923]) op: Equal rhs: {(DQ ($ VSub_Name '$WHERE') (' || '))} spids: [1923] ) ] spids: [1923] ) ] spids: [1920 1921 1928 16777215] ) (case_arm pat_list: [{(not)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE spids:[1934]) op: Equal rhs: {(DQ ($ VSub_Name '$WHERE') (' !'))} spids: [1934] ) ] spids: [1934] ) ] spids: [1931 1932 1940 16777215] ) (case_arm pat_list: [{(Lit_Other '=')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE spids:[1946]) op: Equal rhs: {(DQ ($ VSub_Name '$WHERE') (' == '))} spids: [1946] ) ] spids: [1946] ) ] spids: [1943 1944 1951 16777215] ) (case_arm pat_list: [{(SQ <in>)}] action: [ (C {(shift)}) (C {(set)} {(X)} { (CommandSubPart command_list: (CommandList children: [ (Subshell child: (CommandList children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SUBSELECT spids:[1969]) op: Equal rhs: {(SQ <Y>)} spids: [1969] ) ] spids: [1969] ) terminator: <Op_Semi ';'> ) (C {(select_)} {(DQ ($ VSub_At '$@'))}) ] ) spids: [1967 1980] ) ] ) left_token: <Left_Backtick '`'> spids: [1966 1981] ) } ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-eq)} {(0)} {(Lit_Other ']')} ) ] action: [(C {(shift)})] spids: [16777215 1999] ) ] else_action: [ (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] spids: [2004 2011] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:INWHERE spids:[2014]) op: Equal rhs: {(DQ )} spids: [2014] ) ] spids: [2014] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMP spids:[2019]) op: Equal rhs: {(DQ ('=='))} spids: [2019] ) ] spids: [2019] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LOGIC spids:[2025]) op: Equal rhs: {(DQ ('||'))} spids: [2025] ) ] spids: [2025] ) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Name '$LAST'))} {(Lit_Other '=')} {(DQ (Xnot))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMP spids:[2048]) op: Equal rhs: {(DQ ('='))} spids: [2048] ) ] spids: [2048] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LOGIC spids:[2055]) op: Equal rhs: {(DQ ('&&'))} spids: [2055] ) ] spids: [2055] ) ] ) (ForEach iter_name: VALUE do_arg_iter: T body: (DoGroup children: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Name '$INWHERE'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (X))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:INWHERE spids:[2089]) op: Equal rhs: { (DQ ($ VSub_Name '$INWHERE') (' ') ($ VSub_Name '$LOGIC') ) } spids: [2089] ) ] spids: [2089] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:INWHERE spids:[2097]) op: Equal rhs: { (DQ ($ VSub_Name '$INWHERE') (' (') ($ VSub_Name '$WHERE') ($ VSub_Name '$COMP') (' ') ($ VSub_Name '$VALUE') (') ') ) } spids: [2097] ) ] spids: [2097] ) ] spids: [2066 2109] ) spids: [16777215 16777215] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE spids:[2112]) op: Equal rhs: {(DQ ($ VSub_Name '$INWHERE'))} spids: [2112] ) ] spids: [2112] ) (ControlFlow token:<ControlFlow_Break break>) ] spids: [1954 1957 2119 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(lookup_field)} {(DQ ($ VSub_Number '$1'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE spids:[2132]) op: Equal rhs: {(DQ ($ VSub_Name '$WHERE') (' ') ($ VSub_Name '$OUTFIELD'))} spids: [2132] ) ] spids: [2132] ) ] spids: [2122 2123 2138 16777215] ) ] spids: [1900 1906 2141] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LAST spids:[2144]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [2144] ) ] spids: [2144] ) (C {(shift)}) ] spids: [1821 2153] ) ) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$WHERE'))} {(Lit_Other ']')}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE spids:[2167]) op: Equal rhs: {(DQ (' ( ') ($ VSub_Name '$WHERE') (' ) '))} spids: [2167] ) ] spids: [2167] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] ) (SimpleCommand words: [{(echo)} {(DQ ("Missing 'where' clause"))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(syntax)} {(where)}) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [1776] ) spids: [1773 1776] ) (FuncDef name: help body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other ']')}) ] action: [ (Sentence child: (SimpleCommand words: [{(echo)} {(DQ ('Ambiguous syntax, try:'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) terminator: <Op_Semi ';'> ) (C {(syntax)} {(help)}) ] spids: [16777215 2234] ) (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other '=')} {(DQ (all))} {(Lit_Other ']')} ) ] action: [ (Pipeline children: [ (SimpleCommand words: [ {(ls)} {(Lit_Other '*') (Lit_Other '@')} {(Lit_Other '*') (Lit_Other '%')} ] redirects: [(Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})] ) (C {(cut)} {(-d) (Lit_Other '@')} {(-f1)}) (C {(cut)} {(-d) (Lit_Other '%')} {(-f1)}) (C {(uniq)}) ] negated: F ) ] spids: [2252 2269] ) (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other '=')} {(DQ (tables))} {(Lit_Other ']')} ) ] action: [ (Pipeline children: [ (SimpleCommand words: [ {(ls)} {(Lit_Other '*') (Lit_Other '@')} {(Lit_Other '*') (Lit_Other '%')} ] redirects: [(Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})] ) (C {(cut)} {(-d) (Lit_Other '@')} {(-f1)}) (C {(cut)} {(-d) (Lit_Other '%')} {(-f1)}) (C {(uniq)} {(-u)}) ] negated: F ) ] spids: [2305 2323] ) (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other '=')} {(DQ (views))} {(Lit_Other ']')} ) ] action: [ (Pipeline children: [ (SimpleCommand words: [{(ls)} {(Lit_Other '*') (Lit_Other '%')}] redirects: [(Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})] ) (C {(cut)} {(-d) (Lit_Other '%')} {(-f1)}) ] negated: F ) ] spids: [2362 2380] ) (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other '=')} {(DQ (commands))} {(Lit_Other ']')} ) ] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(DQ (END))} here_end_span_id: 2438 stdin_parts: [ ('/p is print\n') ('/g is go(execute)\n') ('/q is quit\n') ('/e is edit\n') ('/i is include\n') ('/w is write\n') ('/r is reset(clear)\n') ('/s is shell\n') ('/p/g print and go\n') ( 'The number sign(#) may be used at the start of a line for comments.\n' ) ] ) ] ) ] spids: [2401 2418] ) ] else_action: [ (AndOr ops: [Op_DAmp] children: [ (C {(syntax)} {($ VSub_Number '$2')}) (ControlFlow token:<ControlFlow_Return return>) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE spids:[2451]) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [2451] ) ] spids: [2451] ) (C {(update_view)} {(DQ ($ VSub_Name '$TABLE'))}) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Number '$2') ('@'))} {(Lit_Other ']')}) ] action: [ (AndOr ops: [Op_DAmp] children: [ (C {(echo)} {(DQ ($ VSub_Name '$NL') (' <') ($ VSub_Number '$2') ('>'))}) (C {(cat)} {(DQ ($ VSub_Number '$2') ('@'))}) ] ) (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(-f)} {(DQ (${ VSub_Number 2) ('%'))} {(Lit_Other ']')}) (C {(echo)} {($ VSub_Name '$NOCR1')} {(DQ ($ VSub_Name '$NL') (' View:\t') ($ VSub_Name '$NOCR2'))} ) (C {(set)} {(X)} { (CommandSubPart command_list: (CommandList children: [(C {(cat)} {($ VSub_Number '$2') (Lit_Other '%')})] ) left_token: <Left_Backtick '`'> spids: [2532 2537] ) } ) (C {(shift)}) (C {(echo)} { (DQ ($ VSub_Number '$1') (.) ($ VSub_Number '$2') (' = ') ($ VSub_Number '$3') (.) ($ VSub_Number '$4') ) } ) ] ) (C {(echo)} {(DQ ($ VSub_Name '$NL') (' Rows:\t')) (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(cat)} {($ VSub_Name '$TABLE') (Lit_TildeLike '~')}) (C {(wc)} {(-l)}) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [2565 2576] ) } ) ] spids: [16777215 2479] ) ] else_action: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$TABLE') (' does not exist.'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(syntax)} {(help)}) ] spids: [2579 2597] ) ] spids: [2440 2600] ) ] spids: [2218] ) spids: [2215 2218] ) (FuncDef name: create body: (BraceGroup children: [ (C {(shift)}) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Number '$2') ('@'))} {(-o)} {(-f)} {(DQ ($ VSub_Number '$2') ('%'))} {(Lit_Other ']')} ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ('Table already exists.'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) ] spids: [16777215 2649] ) (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xview))} {(-a)} {($ VSub_Pound '$#')} {(-gt)} {(2)} {(Lit_Other ']')} ) ] action: [ (C {(shift)}) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-ne)} {(6)} {(Lit_Other ']')}) ] action: [(C {(syntax)} {(create)})] spids: [16777215 2705] ) ] else_action: [ (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$2'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X('))} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ('Bad syntax'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(syntax)} {(create)}) (ControlFlow token: <ControlFlow_Return return> ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE1 spids:[2756]) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Number '$3')} {(Lit_Other ':')} {(SQ <'\\([^\\.]*\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [2758 2768] ) ) } spids: [2756] ) ] spids: [2756] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FIELD1 spids:[2772]) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Number '$3')} {(Lit_Other ':')} {(SQ <'[^\\.]*.\\(.*\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [2774 2784] ) ) } spids: [2772] ) ] spids: [2772] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE spids:[2788]) op: Equal rhs: {(DQ ($ VSub_Name '$TABLE1'))} spids: [2788] ) ] spids: [2788] ) (C {(lookup_field)} {(DQ ($ VSub_Name '$FIELD1'))}) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ('Bad table or field name'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token: <ControlFlow_Return return> ) ] ) (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$4'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X='))} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ('Bad syntax'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(syntax)} {(create)}) (ControlFlow token: <ControlFlow_Return return> ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE2 spids:[2871]) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Number '$5')} {(Lit_Other ':')} {(SQ <'\\([^\\.]*\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [2873 2883] ) ) } spids: [2871] ) ] spids: [2871] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FIELD2 spids:[2887]) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Number '$5')} {(Lit_Other ':')} {(SQ <'[^\\.]*.\\(.*\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [2889 2899] ) ) } spids: [2887] ) ] spids: [2887] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE spids:[2903]) op: Equal rhs: {(DQ ($ VSub_Name '$TABLE2'))} spids: [2903] ) ] spids: [2903] ) (C {(lookup_field)} {(DQ ($ VSub_Name '$FIELD2'))}) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ('Bad table or field name'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token: <ControlFlow_Return return> ) ] ) (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$2'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X('))} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ('Bad syntax'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(syntax)} {(create)}) (ControlFlow token: <ControlFlow_Return return> ) ] ) (SimpleCommand words: [ {(echo)} { (DQ ($ VSub_Name '$TABLE1') (' ') ($ VSub_Name '$FIELD1') (' ') ($ VSub_Name '$TABLE2') (' ') ($ VSub_Name '$FIELD2') (' ') ($ VSub_Number '$1') ) } ] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_Number '$1') (Lit_Other '%')} ) ] ) (C {(update_view)} {(DQ ($ VSub_Number '$1'))}) ] spids: [2712 3014] ) (C {(echo)} {(DQ (OK))}) ] spids: [2661 2687] ) (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xtable))} {(-a)} {($ VSub_Pound '$#')} {(-ge)} {(5)} {(Lit_Other ']')} ) ] action: [ (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$3'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X('))} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ('Bad syntax'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(syntax)} {(create)}) (ControlFlow token:<ControlFlow_Return return>) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE spids:[3094]) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [3094] ) ] spids: [3094] ) (C {(shift)} {(3)}) (SimpleCommand redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_Name '$TABLE') (Lit_Other '@')} ) ] ) (SimpleCommand redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_Name '$TABLE') (Lit_TildeLike '~')} ) ] ) (WhileUntil keyword: <KW_While while> cond: [ (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-ge)} {(2)} {(Lit_Other ']')}) ] body: (DoGroup children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Number '$1') ('\t') ($ VSub_Number '$2'))}] redirects: [ (Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {($ VSub_Name '$TABLE') (Lit_Other '@')} ) ] ) (C {(shift)} {(2)}) ] spids: [3130 3152] ) ) (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X)'))} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ('Bad syntax'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(rm)} {(-f)} {($ VSub_Name '$TABLE') (Lit_Other '[') (Lit_Other '@') (Lit_TildeLike '~') (Lit_Other ']') } ) (C {(syntax)} {(create)}) (ControlFlow token:<ControlFlow_Return return>) ] ) (C {(echo)} {(DQ (OK))}) ] spids: [3024 3051] ) ] else_action: [ (SimpleCommand words: [{(echo)} {(DQ ('Improper syntax (') ($ VSub_Number '$1') (')'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(syntax)} {(create)}) ] spids: [3214 3235] ) (ControlFlow token:<ControlFlow_Return return>) ] spids: [2620] ) spids: [2617 2620] ) (FuncDef name: drop body: (BraceGroup children: [ (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$2'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (table))} {(-a)} {(DQ ($ VSub_Number '$2'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (view))} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ('Syntax error.'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(syntax)} {(drop)}) (ControlFlow token:<ControlFlow_Return return>) ] ) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other '=')} {(DQ (table))} {(-a)} {(-f)} {(DQ ($ VSub_Number '$3') ('%'))} {(Lit_Other ']')} ) (SimpleCommand words: [ {(echo)} {(DQ ('Can not drop, ') ($ VSub_Number '$2') (' is a view, not a table'))} ] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Return return>) ] ) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other '=')} {(DQ (view))} {(-a)} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Number '$3') ('%'))} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ('Can not drop, ') ($ VSub_Number '$2') (' is not a view'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Return return>) ] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Number '$3') ('@'))} {(-o)} {(-f)} {(DQ ($ VSub_Number '$3') ('%'))} {(Lit_Other ']')} ) ] action: [ (C {(rm)} {(-f)} {($ VSub_Number '$3') (Lit_Other '@')} {($ VSub_Number '$3') (Lit_TildeLike '~')} {($ VSub_Number '$3') (Lit_Other '%')} ) (C {(echo)} {(DQ (OK))}) ] spids: [16777215 3423] ) ] else_action: [ (SimpleCommand words: [{(echo)} {(DQ ('No such table'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) ] spids: [3446 3458] ) ] spids: [3258] ) spids: [3255 3258] ) (FuncDef name: insert body: (BraceGroup children: [ (C {(shift)}) (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (Xinto))} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ('Improper syntax (') ($ VSub_Number '$1') (')'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(syntax)} {(insert)}) (ControlFlow token:<ControlFlow_Return return>) ] ) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE spids:[3529]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [3529] ) ] spids: [3529] ) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(update_view)} {(DQ ($ VSub_Name '$TABLE'))}) (SimpleCommand words: [{(echo)} {(DQ ('Can not insert into a view'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Return return>) ] ) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Name '$TABLE') ('@'))} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ('Table does not exist'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Return return>) ] ) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ATTRIB spids:[3589]) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(cat)} {($ VSub_Name '$TABLE') (Lit_Other '@')}) (C {(wc)} {(-l)}) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [3591 3602] ) ) } spids: [3589] ) ] spids: [3589] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:XASGN spids:[3606]) op: Equal rhs: {(DQ )} spids: [3606] ) ] spids: [3606] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:XECHO spids:[3611]) op: Equal rhs: {(DQ ('echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>))} spids: [3611] ) ] spids: [3611] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-gt)} {(0)} {(-a)} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ ('X('))} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ATTRIB2 spids:[3646]) op: Equal rhs: {(DQ (0))} spids: [3646] ) ] spids: [3646] ) (C {(shift)}) (WhileUntil keyword: <KW_While while> cond: [ (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-gt)} {(0)} {(-a)} {(DQ (X) ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X)'))} {(Lit_Other ']')} ) ] body: (DoGroup children: [ (C {(lookup_field)} {(DQ ($ VSub_Number '$1'))}) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')} ) (SimpleCommand words: [ {(echo)} {(DQ ('Bad field name. (') ($ VSub_Number '$1') (')'))} ] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token: <ControlFlow_Return return> ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:XASGN spids:[3726]) op: Equal rhs: { (DQ ($ VSub_Name '$XASGN') (' X') ($ VSub_Name '$OUTFIELDNUM') ('=') (EscapedLiteralPart token:<Lit_EscapedChar '\\`'>) ('eval echo ') (EscapedLiteralPart token: <Lit_EscapedChar '\\$'> ) (1) (EscapedLiteralPart token:<Lit_EscapedChar '\\`'>) (' ; shift;') ) } spids: [3726] ) ] spids: [3726] ) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ATTRIB2 spids:[3744]) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Name '$ATTRIB2')} {(Lit_Other '+')} {(1)} ) ] ) left_token: <Left_Backtick '`'> spids: [3745 3753] ) } spids: [3744] ) ] spids: [3744] ) ] spids: [3682 3756] ) ) (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X)'))} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ('Syntax error (') ($ VSub_Number '$1') (')'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(syntax)} {(insert)}) (ControlFlow token:<ControlFlow_Return return>) ] ) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POS spids:[3804]) op: Equal rhs: {(DQ (1))} spids: [3804] ) ] spids: [3804] ) (WhileUntil keyword: <KW_While while> cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$POS'))} {(-le)} {(DQ ($ VSub_Name '$ATTRIB'))} {(Lit_Other ']')} ) ] body: (DoGroup children: [ (C {(eval)} {(X) ($ VSub_Name '$POS') (Lit_Other '=') (DQ )}) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$POS'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (1))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:XECHO spids:[3856]) op: Equal rhs: { (DQ ($ VSub_Name '$XECHO') (EscapedLiteralPart token: <Lit_EscapedChar '\\$'> ) (TAB) ) } spids: [3856] ) ] spids: [3856] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:XECHO spids:[3864]) op: Equal rhs: { (DQ ($ VSub_Name '$XECHO') (EscapedLiteralPart token: <Lit_EscapedChar '\\$'> ) (X) ($ VSub_Name '$POS') ) } spids: [3864] ) ] spids: [3864] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POS spids:[3873]) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Name '$POS')} {(Lit_Other '+')} {(1)}) ] ) left_token: <Left_Backtick '`'> spids: [3874 3882] ) } spids: [3873] ) ] spids: [3873] ) ] spids: [3827 3885] ) ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:XECHO spids:[3888]) op: Equal rhs: { (DQ ($ VSub_Name '$XECHO') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ) } spids: [3888] ) ] spids: [3888] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ATTRIB spids:[3895]) op: Equal rhs: {(DQ ($ VSub_Name '$ATTRIB2'))} spids: [3895] ) ] spids: [3895] ) ] spids: [16777215 3644] ) ] spids: [16777215 3901] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xselect))} {(Lit_Other ']')} ) ] action: [ (C {(eval)} {(set)} {(X)} { (DQ (CommandSubPart command_list: (CommandList children: [ (Subshell child: (CommandList children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SUBSELECT spids:[3935]) op: Equal rhs: {(SQ <Y>)} spids: [3935] ) ] spids: [3935] ) terminator: <Op_Semi ';'> ) (C {(select_)} {(DQ ($ VSub_At '$@'))}) ] ) spids: [3933 3948] ) ] ) left_token: <Left_Backtick '`'> spids: [3932 3949] ) (' ') (Lit_Other '\\') (')') ) } ) (C {(shift)}) ] spids: [16777215 3923] ) (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (Xvalues))} {(-o)} {(DQ (X) ($ VSub_Number '$2'))} {(KW_Bang '!') (Lit_Other '=')} {(SQ <'X('>)} {(Lit_Other ']')} ) ] action: [ (AndOr ops: [Op_DAmp Op_DAmp] children: [ (SimpleCommand words: [{(echo)} {(DQ ('Improper syntax (') ($ VSub_Number '$1') (')'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(syntax)} {(insert)}) (ControlFlow token:<ControlFlow_Return return>) ] ) ] spids: [3959 3993] ) ] else_action: [(C {(shift)} {(2)})] spids: [4019 4026] ) (ForEach iter_name: LAST do_arg_iter: T body: (DoGroup children: [(Sentence child:(C {(Lit_Other ':')}) terminator:<Op_Semi ';'>)] spids: [4033 4041] ) spids: [16777215 16777215] ) (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Name '$LAST'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X)'))} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ('Improper syntax'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(syntax)} {(insert)}) (ControlFlow token:<ControlFlow_Return return>) ] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(EscapedLiteralPart token:<Lit_EscapedChar '\\('>)} {($ VSub_Pound '$#')} {(-)} {(1)} {(EscapedLiteralPart token:<Lit_EscapedChar '\\)'>)} {(Lit_Other '%')} {($ VSub_Name '$ATTRIB')} ) ] ) left_token: <Left_Backtick '`'> spids: [4089 4105] ) ) } {(-ne)} {(0)} {(Lit_Other ']')} ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ('Incorrect number of values.'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) ] spids: [16777215 4115] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ROWS spids:[4129]) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(EscapedLiteralPart token:<Lit_EscapedChar '\\('>)} {($ VSub_Pound '$#')} {(-)} {(1)} {(EscapedLiteralPart token:<Lit_EscapedChar '\\)'>)} {(/)} {($ VSub_Name '$ATTRIB')} ) ] ) left_token: <Left_Backtick '`'> spids: [4131 4147] ) ) } spids: [4129] ) ] spids: [4129] ) (WhileUntil keyword: <KW_While while> cond: [(C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-gt)} {(1)} {(Lit_Other ']')})] body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$XASGN'))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) ] action: [ (SimpleCommand words: [ {(echo)} {($ VSub_Name '$NOCR1')} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(eval)} {(echo)} {($ VSub_Number '$1')})] ) left_token: <Left_Backtick '`'> spids: [4193 4199] ) ($ VSub_Name '$NOCR2') ) } ] redirects: [ (Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {($ VSub_Name '$TABLE') (Lit_TildeLike '~')} ) ] ) (C {(shift)}) (WhileUntil keyword: <KW_While while> cond: [ (C {(Lit_Other '[')} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} { (EscapedLiteralPart token: <Lit_EscapedChar '\\('> ) } {($ VSub_Pound '$#')} {(-)} {(1)} {(EscapedLiteralPart token:<Lit_EscapedChar '\\)'>)} {(Lit_Other '%')} {($ VSub_Name '$ATTRIB')} ) ] ) left_token: <Left_Backtick '`'> spids: [4218 4234] ) ) } {(-ne)} {(0)} {(Lit_Other ']')} ) ] body: (DoGroup children: [ (SimpleCommand words: [ {(echo)} {($ VSub_Name '$NOCR1')} { (DQ ($ VSub_Name '$TAB') (CommandSubPart command_list: (CommandList children: [ (C {(eval)} {(echo)} {($ VSub_Number '$1')}) ] ) left_token: <Left_Backtick '`'> spids: [4253 4259] ) ($ VSub_Name '$NOCR2') ) } ] redirects: [ (Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {($ VSub_Name '$TABLE') (Lit_TildeLike '~')} ) ] ) (C {(shift)}) ] spids: [4244 4273] ) ) (SimpleCommand words: [{(echo)} {(DQ )}] redirects: [ (Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {($ VSub_Name '$TABLE') (Lit_TildeLike '~')} ) ] ) ] spids: [16777215 4184] ) ] else_action: [ (C {(eval)} {($ VSub_Name '$XASGN')}) (SimpleCommand words: [{(eval)} {($ VSub_Name '$XECHO')}] redirects: [ (Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {($ VSub_Name '$TABLE') (Lit_TildeLike '~')} ) ] ) ] spids: [4287 4304] ) ] spids: [4164 4307] ) ) (C {(echo)} {(DQ ('(') ($ VSub_Name '$ROWS') (' rows)'))}) ] spids: [4127 4320] ) ] spids: [3478] ) spids: [3475 3478] ) (FuncDef name: delete body: (BraceGroup children: [ (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE spids:[4346]) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [4346] ) ] spids: [4346] ) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(update_view)} {(DQ ($ VSub_Name '$TABLE'))}) (SimpleCommand words: [{(echo)} {(DQ ('You can not delete from a view.'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Return return>) ] ) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Name '$TABLE') ('@'))} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$TABLE') (' does not exit.'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Return return>) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE spids:[4406]) op: Equal rhs: {(DQ )} spids: [4406] ) ] spids: [4406] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$3'))} {(Lit_Other '=')} {(DQ (Xwhere))} {(Lit_Other ']')} ) ] action: [ (C {(shift)} {(2)}) (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(where)} {(DQ ($ VSub_At '$@'))}) (SimpleCommand words: [ {($ VSub_Name '$AWK')} {(-F) (DQ ('\t'))} { (DQ ('! ') ($ VSub_Name '$WHERE') (' { cnt += 1 ; print } \n') ('\t\t\tEND { printf ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('( %1d rows.)') (EscapedLiteralPart token: <Lit_EscapedChar '\\\\'> ) (n) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (', (NR - cnt) ') ('\t\t\t>') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (/tmp/) ($ VSub_Dollar '$$') (row) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' }') ) } {($ VSub_Name '$TABLE') (Lit_TildeLike '~')} ] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/tmp/) ($ VSub_Dollar '$$')} ) ] ) (C {(mv)} {(/tmp/) ($ VSub_Dollar '$$')} {($ VSub_Name '$TABLE') (Lit_TildeLike '~')} ) (C {(cat)} {(/tmp/) ($ VSub_Dollar '$$') (row)}) ] ) ] spids: [16777215 4429] ) ] else_action: [ (C {(echo)} {(SQ <'('>) (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(cat)} {($ VSub_Name '$TABLE') (Lit_TildeLike '~')}) (C {(wc)} {(-l)}) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [4510 4521] ) (SQ <' rows)'>) } ) (SimpleCommand redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_Name '$TABLE') (Lit_TildeLike '~')} ) ] ) ] spids: [4503 4534] ) ] spids: [4340] ) spids: [4337 4340] ) (FuncDef name: update body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE spids:[4557]) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [4557] ) ] spids: [4557] ) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(update_view)} {(DQ ($ VSub_Name '$TABLE'))}) (SimpleCommand words: [{(echo)} {(DQ ('Can not update a view.'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Return return>) ] ) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Name '$TABLE') ('@'))} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$TABLE') (' does not exit.'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Return return>) ] ) (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$3'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (Xset))} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ('Improper syntax.'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(syntax)} {(update)}) (ControlFlow token:<ControlFlow_Return return>) ] ) (C {(shift)} {(3)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ASSIGN spids:[4660]) op: Equal rhs: {(DQ )} spids: [4660] ) ] spids: [4660] ) (WhileUntil keyword: <KW_While while> cond: [ (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-gt)} {(0)} {(-a)} {(DQ (X) ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (Xwhere))} {(Lit_Other ']')} ) ] body: (DoGroup children: [ (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(lookup_field)} {(DQ ($ VSub_Number '$1'))}) (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$2'))} {(Lit_Other '=')} {(DQ ('X='))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ASSIGN spids:[4720]) op: Equal rhs: {(DQ ($ VSub_Name '$ASSIGN') (' ; '))} spids: [4720] ) ] spids: [4720] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ASSIGN spids:[4727]) op: Equal rhs: {(DQ ($ VSub_Name '$ASSIGN') (' ') ($ VSub_Name '$OUTFIELD'))} spids: [4727] ) ] spids: [4727] ) (C {(shift)}) ] spids: [4692 4738] ) ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE spids:[4741]) op: Equal rhs: {(DQ )} spids: [4741] ) ] spids: [4741] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xwhere))} {(Lit_Other ']')} ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(where)} {(DQ ($ VSub_At '$@'))}) (ControlFlow token:<ControlFlow_Return return>) ] ) ] spids: [16777215 4765] ) ] spids: [16777215 4779] ) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (SimpleCommand words: [ {($ VSub_Name '$AWK')} {(-F) (DQ ('\t'))} { (DQ ('BEGIN { OFS = ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('\t') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' }\n') ('\t\t') ($ VSub_Name '$WHERE') (' \t{ ') ($ VSub_Name '$ASSIGN') ('; cnt += 1 }\n') ('\t\t\t{ print } \n') ('\t\tEND \t{ printf ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('( %1d rows)') (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) (n) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (', cnt >') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (/tmp/) ($ VSub_Dollar '$$') (row) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' }') ) } {($ VSub_Name '$TABLE') (Lit_TildeLike '~')} ] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/tmp/) ($ VSub_Dollar '$$')} ) ] ) (C {(mv)} {(/tmp/) ($ VSub_Dollar '$$')} {($ VSub_Name '$TABLE') (Lit_TildeLike '~')}) (C {(cat)} {(/tmp/) ($ VSub_Dollar '$$') (row)}) ] ) ] spids: [4554] ) spids: [4551 4554] ) (FuncDef name: select_ body: (BraceGroup children: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$DEBUG'))} {(Lit_Other '=')} {(DQ (Y))} {(Lit_Other ']')} ) (C {(set)} {(-x)}) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:UNION spids:[4890]) op: Equal rhs: {(DQ (Y))} spids: [4890] ) ] spids: [4890] ) (WhileUntil keyword: <KW_While while> cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$UNION'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) ] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:INAGG spids:[4916]) op: Equal rhs: {(DQ )} spids: [4916] ) ] spids: [4916] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FROM spids:[4921]) op: Equal rhs: {(DQ )} spids: [4921] ) ] spids: [4921] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:UNION spids:[4926]) op: Equal rhs: {(DQ )} spids: [4926] ) ] spids: [4926] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE spids:[4931]) op: Equal rhs: {(DQ )} spids: [4931] ) ] spids: [4931] ) (ForEach iter_name: ATABLE do_arg_iter: T body: (DoGroup children: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Name '$ATABLE'))} {(Lit_Other '=')} {(DQ (Xwhere))} {(Lit_Other ']')} ) (ControlFlow token: <ControlFlow_Break break> ) ] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Name '$ATABLE'))} {(Lit_Other '=')} {(DQ (Xorder))} {(Lit_Other ']')} ) (ControlFlow token: <ControlFlow_Break break> ) ] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Name '$ATABLE'))} {(Lit_Other '=')} {(DQ (Xunion))} {(Lit_Other ']')} ) (ControlFlow token: <ControlFlow_Break break> ) ] ) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Name '$ATABLE'))} {(Lit_Other '=')} {(DQ (Xfrom))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FROM spids:[5021]) op: Equal rhs: {(DQ (Y))} spids: [5021] ) ] spids: [5021] ) (ControlFlow token: <ControlFlow_Continue continue> ) ] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$FROM'))} {(Lit_Other ']')}) ] action: [ (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Name '$ATABLE') ('@'))} {(Lit_Other ']')} ) (SimpleCommand words: [ {(echo)} {(DQ ($ VSub_Name '$ATABLE') (' does not exist.'))} ] redirects: [ (Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$TABLE'))} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE spids:[5094]) op: Equal rhs: {(DQ ($ VSub_Name '$ATABLE'))} spids: [5094] ) ] spids: [5094] ) ] spids: [16777215 5092] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:JTABLE spids:[5102]) op: Equal rhs: {(DQ ($ VSub_Name '$TABLE'))} spids: [5102] ) ] spids: [5102] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PREV spids:[5108]) op: Equal rhs: {(DQ )} spids: [5108] ) ] spids: [5108] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PPREV spids:[5113]) op: Equal rhs: {(DQ )} spids: [5113] ) ] spids: [5113] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FOUND spids:[5118]) op: Equal rhs: {(DQ )} spids: [5118] ) ] spids: [5118] ) (ForEach iter_name: GETJ do_arg_iter: T body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$PREV'))} {(Lit_Other '=')} {(DQ ('='))} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE spids:[5151]) op: Equal rhs: {(DQ ($ VSub_Name '$JTABLE'))} spids: [5151] ) ] spids: [5151] ) (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(lookup_field)} {(DQ ($ VSub_Name '$PPREV'))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name: TABLE spids: [5166] ) op: Equal rhs: {(DQ ($ VSub_Name '$ATABLE'))} spids: [5166] ) ] spids: [5166] ) (C {(lookup_field)} {(DQ ($ VSub_Name '$GETJ'))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name: FOUND spids: [5183] ) op: Equal rhs: {(DQ (Y1))} spids: [5183] ) ] spids: [5183] ) (ControlFlow token: <ControlFlow_Break break> ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE spids:[5194]) op: Equal rhs: {(DQ ($ VSub_Name '$ATABLE'))} spids: [5194] ) ] spids: [5194] ) (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(lookup_field)} {(DQ ($ VSub_Name '$PPREV'))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name: TABLE spids: [5209] ) op: Equal rhs: {(DQ ($ VSub_Name '$JTABLE'))} spids: [5209] ) ] spids: [5209] ) (C {(lookup_field)} {(DQ ($ VSub_Name '$GETJ'))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name: FOUND spids: [5226] ) op: Equal rhs: {(DQ (Y2))} spids: [5226] ) ] spids: [5226] ) (ControlFlow token: <ControlFlow_Break break> ) ] ) ] spids: [16777215 5148] ) ] spids: [16777215 5237] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PPREV spids:[5240]) op: Equal rhs: {(DQ ($ VSub_Name '$PREV'))} spids: [5240] ) ] spids: [5240] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PREV spids:[5246]) op: Equal rhs: {(DQ ($ VSub_Name '$GETJ'))} spids: [5246] ) ] spids: [5246] ) ] spids: [5128 5252] ) spids: [16777215 16777215] ) (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$FOUND'))} {(Lit_Other ']')} ) (C {(echo)} {(DQ ('Join not found, ') (Lit_Other '\\') (c))}) (SimpleCommand words: [{(echo)} {(DQ ('try reordering tables.'))}] redirects: [ (Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$FOUND'))} {(Lit_Other '=')} {(DQ (Y1))} {(Lit_Other ']')} ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ($ VSub_Name '$JTABLE') ('\t') ($ VSub_Name '$PPREV') ('\t') ($ VSub_Name '$ATABLE') ('\t') ($ VSub_Name '$GETJ') ('\t/tmp/') ($ VSub_Dollar '$$') (join2) ) } ] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/tmp/) ($ VSub_Dollar '$$') (join2) (Lit_Other '%') } ) ] ) ] spids: [16777215 5312] ) ] else_action: [ (SimpleCommand words: [ {(echo)} { (DQ ($ VSub_Name '$ATABLE') ('\t') ($ VSub_Name '$PPREV') ('\t') ($ VSub_Name '$JTABLE') ('\t') ($ VSub_Name '$GETJ') ('\t/tmp/') ($ VSub_Dollar '$$') (join2) ) } ] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/tmp/) ($ VSub_Dollar '$$') (join2) (Lit_Other '%') } ) ] ) ] spids: [5337 5362] ) (C {(update_view)} {(/tmp/) ($ VSub_Dollar '$$') (join2)}) (C {(mv)} {(/tmp/) ($ VSub_Dollar '$$') (join2) (Lit_TildeLike '~')} {(/tmp/) ($ VSub_Dollar '$$') (join) (Lit_TildeLike '~')} ) (C {(mv)} {(/tmp/) ($ VSub_Dollar '$$') (join2) (Lit_Other '@')} {(/tmp/) ($ VSub_Dollar '$$') (join) (Lit_Other '@')} ) (SimpleCommand words: [ {(expr)} {(DQ ($ VSub_Name '$RESULT'))} {(Lit_Other ':')} {(SQ <'[^:]:*\\(.*\\)'>)} ] redirects: [ (Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {(/tmp/) ($ VSub_Dollar '$$') (join) (Lit_Other '@')} ) ] ) (Pipeline children: [ (C {(cut)} {(-d) (EscapedLiteralPart token: <Lit_EscapedChar '\\\t'> ) } {(-f1)} {(/tmp/) ($ VSub_Dollar '$$') (join) (Lit_TildeLike '~')} ) (SimpleCommand words: [ {(paste)} {(/tmp/) ($ VSub_Dollar '$$') (join) (Lit_TildeLike '~') } {(-)} ] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/tmp/) ($ VSub_Dollar '$$')} ) ] ) ] negated: F ) (C {(mv)} {(/tmp/) ($ VSub_Dollar '$$')} {(/tmp/) ($ VSub_Dollar '$$') (join) (Lit_TildeLike '~')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE spids:[5458]) op: Equal rhs: {(DQ (/tmp/) ($ VSub_Dollar '$$') (join))} spids: [5458] ) ] spids: [5458] ) ] spids: [5100 5466] ) ] spids: [16777215 5042] ) ] spids: [16777215 5469] ) ] spids: [4941 5472] ) spids: [16777215 16777215] ) (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$FROM'))} {(Lit_Other ']')} ) (SimpleCommand words: [{(echo)} {(DQ ('Syntax error.'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(syntax)} {(select)}) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) (C {(update_view)} {(DQ ($ VSub_Name '$TABLE'))}) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DISTINCT spids:[5520]) op: Equal rhs: {(DQ )} spids: [5520] ) ] spids: [5520] ) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xdistinct))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DISTINCT spids:[5542]) op: Equal rhs: {(DQ (Y))} spids: [5542] ) ] spids: [5542] ) (C {(shift)}) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FIELDS spids:[5552]) op: Equal rhs: {(DQ )} spids: [5552] ) ] spids: [5552] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PRINTF spids:[5557]) op: Equal rhs: {(DQ )} spids: [5557] ) ] spids: [5557] ) (WhileUntil keyword: <KW_While while> cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (Xfrom))} {(Lit_Other ']')} ) ] body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(SQ <'X*'>)} {(Lit_Other ']')} ) ] action: [ (C {(shift)}) (C {(set)} {(X)} { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(cat)} {($ VSub_Name '$TABLE') (Lit_Other '@')}) (C {(cut)} {(-d) (EscapedLiteralPart token: <Lit_EscapedChar '\\\t'> ) } {(-f1)} ) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [5611 5625] ) } {(DQ ($ VSub_At '$@'))} ) (C {(shift)}) ] spids: [16777215 5602] ) ] else_action: [ (C {(lookup_field)} {(DQ ($ VSub_Number '$1'))}) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')} ) ] action: [ (C {(do_aggreg)} {(DQ ($ VSub_At '$@'))}) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-eq)} {(0)} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:INAGG spids:[5686]) op: Equal rhs: {(DQ (Y))} spids: [5686] ) ] spids: [5686] ) (C {(shift)} {(3)}) ] spids: [16777215 5684] ) ] else_action: [ (SimpleCommand words: [ {(echo)} { (DQ ('Bad field name (') ($ VSub_Number '$1') (')')) } ] redirects: [ (Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] spids: [5697 5718] ) ] spids: [16777215 5660] ) ] spids: [16777215 5721] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$FIELDS'))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FIELDS spids:[5734]) op: Equal rhs: {(DQ ($ VSub_Name '$FIELDS') (','))} spids: [5734] ) ] spids: [5734] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FIELDS spids:[5741]) op: Equal rhs: { (DQ ($ VSub_Name '$FIELDS') (' ') ($ VSub_Name '$OUTFIELD')) } spids: [5741] ) ] spids: [5741] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$SUBSELECT'))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) ] action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$PRINTF'))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PRINTF spids:[5779]) op: Equal rhs: {(DQ ('|'))} spids: [5779] ) ] spids: [5779] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WIDTH spids:[5785]) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ ($ VSub_Name '$RESULT'))} {(Lit_Other ':')} {(SQ <'[^\t]*\t\\(.*\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [5786 5800] ) } spids: [5785] ) ] spids: [5785] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PRINTF spids:[5803]) op: Equal rhs: { (DQ ($ VSub_Name '$PRINTF') ('%-') ($ VSub_Name '$WIDTH') (.) (${ VSub_Name WIDTH) ('s|') ) } spids: [5803] ) ] spids: [5803] ) ] spids: [16777215 5765] ) ] else_action: [ (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$AGGREGATE'))} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PRINTF spids:[5833]) op: Equal rhs: { (DQ ($ VSub_Name '$PRINTF') (EscapedLiteralPart token: <Lit_EscapedChar '\\\\'> ) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('%s') (EscapedLiteralPart token: <Lit_EscapedChar '\\\\'> ) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' ') ) } spids: [5833] ) ] spids: [5833] ) ] spids: [16777215 5831] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PRINTF spids:[5847]) op: Equal rhs: { (DQ ($ VSub_Name '$PRINTF') ('%s') (Lit_Other '\\') (n) ) } spids: [5847] ) ] spids: [5847] ) ] spids: [5845 5856] ) ] spids: [5816 5859] ) (C {(shift)}) ] spids: [5636 5865] ) ] spids: [5581 5868] ) ) (C {(shift)} {(2)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE spids:[5876]) op: Equal rhs: {(DQ )} spids: [5876] ) ] spids: [5876] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SORT spids:[5881]) op: Equal rhs: {(DQ )} spids: [5881] ) ] spids: [5881] ) (WhileUntil keyword: <KW_While while> cond: [ (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-ne)} {(0)} {(Lit_Other ']')}) ] body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xwhere))} {(Lit_Other ']')} ) ] action: [ (C {(where)} {(DQ ($ VSub_At '$@'))}) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')} ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE spids:[5951]) op: Equal rhs: {(DQ ($ VSub_Name '$WHERE') (' || NR == 1'))} spids: [5951] ) ] spids: [5951] ) (C {(shift)}) ] spids: [16777215 5921] ) (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xorder))} {(Lit_Other ']')} ) ] action: [ (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$2'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (Xby))} {(Lit_Other ']')} ) (SimpleCommand words: [ {(echo)} {(DQ ('Syntax error (') ($ VSub_Number '$2') (')'))} ] redirects: [ (Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) (C {(syntax)} {(select)}) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) (C {(shift)} {(2)}) (WhileUntil keyword: <KW_While while> cond: [ (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-gt)} {(0)} {(-a)} {(DQ ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (union))} {(Lit_Other ']')} ) ] body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (Xasc))} {(-a)} {(DQ (X) ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (Xdesc))} {(-a)} {(DQ (X) ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (Xnum))} {(Lit_Other ']')} ) ] action: [ (C {(lookup_field)} {(DQ ($ VSub_Number '$1'))}) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')} ) (SimpleCommand words: [ {(echo)} { (DQ ('Bad field name (') ($ VSub_Number '$1') (')') ) } ] redirects: [ (Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$SORT'))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SORT spids:[6174]) op: Equal rhs: { (DQ ('sort -t') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ('\t') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' ') ) } spids: [6174] ) ] spids: [6174] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SORTL spids:[6184]) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} { ($ VSub_Name '$OUTFIELDNUM' ) } {(-)} {(1)} ) ] ) left_token: <Left_Backtick '`'> spids: [6186 6194] ) ) } spids: [6184] ) ] spids: [6184] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SORT spids:[6198]) op: Equal rhs: { (DQ ($ VSub_Name '$SORT') (' +') ($ VSub_Name '$SORTL') ) } spids: [6198] ) ] spids: [6198] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$2'))} {(Lit_Other '=')} {(DQ (Xnum))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SORT spids:[6225]) op: Equal rhs: {(DQ (${ VSub_Name SORT) (n))} spids: [6225] ) ] spids: [6225] ) ] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$2'))} {(Lit_Other '=')} {(DQ (Xdesc))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SORT spids:[6253]) op: Equal rhs: {(DQ (${ VSub_Name SORT) (r))} spids: [6253] ) ] spids: [6253] ) ] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$3'))} {(Lit_Other '=')} {(DQ (Xdesc))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SORT spids:[6281]) op: Equal rhs: {(DQ (${ VSub_Name SORT) (r))} spids: [6281] ) ] spids: [6281] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SORT spids:[6290]) op: Equal rhs: { (DQ ($ VSub_Name '$SORT') (' -') ($ VSub_Name '$OUTFIELDNUM') ) } spids: [6290] ) ] spids: [6290] ) ] spids: [16777215 6113] ) ] spids: [16777215 6298] ) (C {(shift)}) ] spids: [6058 6304] ) ) ] spids: [5961 5979] ) (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xunion))} {(Lit_Other ']')} ) ] action: [ (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:UNION spids:[6330]) op: Equal rhs: {(DQ (Y))} spids: [6330] ) ] spids: [6330] ) (ControlFlow token: <ControlFlow_Break break> ) ] spids: [6307 6325] ) ] else_action: [(C {(shift)})] spids: [6339 6344] ) ] spids: [5899 6347] ) ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$INAGG'))} {(Lit_Other ']')}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE spids:[6360]) op: Equal rhs: {(DQ ('NR == 1'))} spids: [6360] ) ] spids: [6360] ) ] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$DISTINCT'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) ] action: [ (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$SORT'))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DIST spids:[6405]) op: Equal rhs: { (DQ ('sort | uniq | tee /tmp/') ($ VSub_Dollar '$$') (row) ) } spids: [6405] ) ] spids: [6405] ) ] spids: [16777215 6403] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DIST spids:[6415]) op: Equal rhs: {(DQ ('uniq | tee /tmp/') ($ VSub_Dollar '$$') (row))} spids: [6415] ) ] spids: [6415] ) ] spids: [6413 6423] ) ] spids: [16777215 6385] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DIST spids:[6428]) op: Equal rhs: {(DQ (cat))} spids: [6428] ) ] spids: [6428] ) ] spids: [6426 6434] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLEFILE spids:[6439]) op: Equal rhs: {(DQ ($ VSub_Name '$TABLE') ('~'))} spids: [6439] ) ] spids: [6439] ) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$SORT'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) (Pipeline children: [ (C {(cat)} {($ VSub_Name '$TABLE') (Lit_TildeLike '~')}) (SimpleCommand words: [{(eval)} {(DQ ($ VSub_Name '$SORT'))}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/tmp/) ($ VSub_Dollar '$$')} ) ] ) ] negated: F ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLEFILE spids:[6483]) op: Equal rhs: {(DQ (/tmp/) ($ VSub_Dollar '$$'))} spids: [6483] ) ] spids: [6483] ) ] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$SUBSELECT'))} {(Lit_Other ']')}) ] action: [ (Pipeline children: [ (C {($ VSub_Name '$AWK')} {(-F) (DQ ('\t'))} { (DQ ($ VSub_Name '$WHERE') (' {printf ') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ($ VSub_Name '$PRINTF') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (', ') ($ VSub_Name '$FIELDS') (' }') ) } {($ VSub_Name '$TABLEFILE')} ) (C {(eval)} {(DQ ($ VSub_Name '$DIST'))}) ] negated: F ) ] spids: [16777215 6502] ) ] else_action: [ (AndOr ops: [Op_DAmp] children: [ (Pipeline children: [ (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$QUIET'))} {(-o)} {(DQ ($ VSub_Name '$INAGG'))} {(Lit_Other '=')} {(DQ (Y))} {(Lit_Other ']')} ) ] action: [ (Subshell child: (CommandList children: [ (Sentence child: (C {(set)} {(X)} { (CommandSubPart command_list: (CommandList children: [ (C {(cut)} {(-d) (EscapedLiteralPart token: <Lit_EscapedChar '\\\t'> ) } {(-f1)} {($ VSub_Name '$TABLE') (Lit_Other '@')} ) ] ) left_token: <Left_Backtick '`'> spids: [6571 6581] ) } ) terminator: <Op_Semi ';'> ) (C {(shift)}) (Sentence child: (C {(echo)} {($ VSub_Name '$NOCR1')} { (DQ (-) ($ VSub_Number '$1') (-) ($ VSub_Name '$NOCR2') ) } ) terminator: <Op_Semi ';'> ) (C {(shift)}) (Sentence child: (ForEach iter_name: HEADING do_arg_iter: T body: (DoGroup children: [ (C {(echo)} {($ VSub_Name '$NOCR1')} { (DQ ($ VSub_Name '$TAB') (-) ($ VSub_Name '$HEADING') (-) ($ VSub_Name '$NOCR2') ) } ) ] spids: [6611 6629] ) spids: [16777215 16777215] ) terminator: <Op_Semi ';'> ) (C {(echo)} {(DQ )}) ] ) spids: [6565 6638] ) ] spids: [16777215 6561] ) ] spids: [16777215 6641] ) (C {($ VSub_Name '$AWK')} {(-F) (DQ ('\t'))} { (DQ ($ VSub_Name '$WHERE') (' { cnt += 1 ; printf ') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ($ VSub_Name '$PRINTF') (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) (n) (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (', ') ($ VSub_Name '$FIELDS') (' }\n') ('\t\t\tEND\t{ printf ') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ('( %1d rows)') (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) (n) (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (', (cnt - 1) ') ('\t\t\t>') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (/tmp/) ($ VSub_Dollar '$$') (row) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' }') ) } {(-)} {($ VSub_Name '$TABLEFILE')} ) (C {(eval)} {(DQ ($ VSub_Name '$DIST'))}) ] negated: F ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$DISTINCT'))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) ] action: [(C {(cat)} {(/tmp/) ($ VSub_Dollar '$$') (row)})] spids: [16777215 6715] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:X spids:[6726]) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(expr)} { (EscapedLiteralPart token: <Lit_EscapedChar '\\`'> ) (cat) } {(/tmp/) ($ VSub_Dollar '$$') (row)} ) (C {(wc)} {(-l) (EscapedLiteralPart token: <Lit_EscapedChar '\\`'> ) } {(-)} {(1)} ) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [6727 6745] ) } spids: [6726] ) ] spids: [6726] ) (C {(echo)} {(SQ <'('>) ($ VSub_Name '$X') (SQ <' rows)'>)}) ] spids: [6724 6760] ) ] ) ] spids: [6534 6763] ) ] spids: [4913 6766] ) ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [4864] ) spids: [4861 4864] ) (WhileUntil keyword: <KW_While while> cond: [(C {(Lit_Other ':')})] body: (DoGroup children: [ (WhileUntil keyword: <KW_While while> cond: [(C {(Lit_Other ':')})] body: (DoGroup children: [ (C {(echo)} {($ VSub_Name '$NOCR1')} {(DQ ('* ') ($ VSub_Name '$NOCR2'))}) (AndOr ops: [Op_DPipe] children: [(C {(read)} {(LINE)}) (ControlFlow token:<ControlFlow_Exit exit>)] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SQLPART spids:[6824]) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ ($ VSub_Name '$LINE'))} {(Lit_Other ':')} {(SQ <'\\(..*\\)/.$'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [6826 6838] ) ) } spids: [6824] ) ] spids: [6824] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$SQLPART'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) ] action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$NEW'))} {(Lit_Other '=')} {(DQ (Y))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_CMD spids:[6878]) op: Equal rhs: {(DQ )} spids: [6878] ) ] spids: [6878] ) ] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ ($ VSub_Name '$LINE'))} {(Lit_Other ':')} {(SQ <'.*/p/g$'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [6888 6900] ) ) } {(-ne)} {(0)} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_CMD spids:[6913]) op: Equal rhs: {(DQ ($ VSub_Name '$_CMD')) (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ ($ VSub_Name '$LINE'))} {(Lit_Other ':')} {(SQ <'\\(.*\\)/p/g$'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [6917 6929] ) (DQ ($ VSub_Name '$NL')) } spids: [6913] ) ] spids: [6913] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LINE spids:[6935]) op: Equal rhs: {(DQ (/p/g))} spids: [6935] ) ] spids: [6935] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NEW spids:[6941]) op: Equal rhs: {(DQ )} spids: [6941] ) ] spids: [6941] ) ] spids: [16777215 6910] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_CMD spids:[6949]) op: Equal rhs: {(DQ ($ VSub_Name '$_CMD')) (DQ ($ VSub_Name '$SQLPART')) (DQ ($ VSub_Name '$NL')) } spids: [6949] ) ] spids: [6949] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LINE spids:[6961]) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ ($ VSub_Name '$LINE'))} {(Lit_Other ':')} {(SQ <'.*\\(/.\\)$'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [6963 6975] ) ) } spids: [6961] ) ] spids: [6961] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NEW spids:[6979]) op: Equal rhs: {(DQ )} spids: [6979] ) ] spids: [6979] ) ] spids: [6946 6984] ) ] spids: [16777215 6859] ) ] spids: [16777215 6987] ) (Case to_match: {(DQ ($ VSub_Name '$LINE'))} arms: [ (case_arm pat_list: [{(/p)} {(p)}] action: [(C {(echo)} {(DQ ($ VSub_Name '$_CMD'))})] spids: [7000 7003 7010 16777215] ) (case_arm pat_list: [{(/g)} {(g)}] action: [(ControlFlow token:<ControlFlow_Break break>)] spids: [7013 7016 7019 16777215] ) (case_arm pat_list: [{(/p/g)} {(pg)}] action: [ (Sentence child: (C {(echo)} {(DQ ($ VSub_Name '$_CMD'))}) terminator: <Op_Semi ';'> ) (ControlFlow token:<ControlFlow_Break break>) ] spids: [7022 7025 7037 16777215] ) (case_arm pat_list: [{(/r)} {(r)}] action: [ (Sentence child: (C {(echo)} {(DQ (reset))}) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_CMD spids:[7053]) op: Equal rhs: {(DQ )} spids: [7053] ) ] spids: [7053] ) ] spids: [7040 7043 7056 16777215] ) (case_arm pat_list: [{(/s)} {(s)}] action: [ (Sentence child: (C {(umask)} {($ VSub_Name '$UMASK')}) terminator: <Op_Semi ';'> ) (Sentence child: (C {($ VSub_Name '$SHELL')}) terminator: <Op_Semi ';'> ) (C {(umask)} {(0000)}) ] spids: [7059 7062 7077 16777215] ) (case_arm pat_list: [{(/e)} {(e)}] action: [ (Sentence child: (C {(umask)} {($ VSub_Name '$UMASK')}) terminator: <Op_Semi ';'> ) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$_CMD'))}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/tmp/) ($ VSub_Dollar '$$')} ) ] ) (Sentence child: (C {($ VSub_Name '$EDITOR')} {(/tmp/) ($ VSub_Dollar '$$')}) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_CMD spids:[7109]) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(cat)} {(/tmp/) ($ VSub_Dollar '$$')})] ) left_token: <Left_Backtick '`'> spids: [7111 7116] ) ) } spids: [7109] ) ] spids: [7109] ) (C {(umask)} {(0000)}) ] spids: [7080 7083 7123 16777215] ) (case_arm pat_list: [{(/i)} {(i)}] action: [ (C {(echo)} {($ VSub_Name '$NOCR1')} {(DQ ('Enter include file: ') ($ VSub_Name '$NOCR2'))} ) (C {(read)} {(LINE)}) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Name '$LINE'))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_CMD spids:[7160]) op: Equal rhs: { (DQ ($ VSub_Name '$_CMD') (CommandSubPart command_list: (CommandList children: [(C {(cat)} {($ VSub_Name '$LINE')})] ) left_token: <Left_Backtick '`'> spids: [7163 7167] ) ($ VSub_Name '$NL') ) } spids: [7160] ) ] spids: [7160] ) (C {(echo)} {(DQ ($ VSub_Name '$LINE') (' included'))}) ] ) ] spids: [7126 7129 7180 16777215] ) (case_arm pat_list: [{(/w)} {(w)}] action: [ (C {(echo)} {($ VSub_Name '$NOCR1')} {(DQ ('Enter output file: ') ($ VSub_Name '$NOCR2'))} ) (C {(read)} {(LINE)}) (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$LINE'))} {(Lit_Other ']')}) (C {(umask)} {($ VSub_Name '$UMASK')}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$_CMD'))}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$LINE'))} ) ] ) (C {(umask)} {(0000)}) (C {(echo)} {(DQ ($ VSub_Name '$LINE') (' written'))}) ] ) ] spids: [7183 7186 7251 16777215] ) (case_arm pat_list: [{(/q)} {(q)}] action: [(ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})] spids: [7254 7257 7262 16777215] ) (case_arm pat_list: [ {(EscapedLiteralPart token:<Lit_EscapedChar '\\#'>) (Lit_Other '*')} ] action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$NEW'))} {(Lit_Other '=')} {(DQ (Y))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_CMD spids:[7286]) op: Equal rhs: {(DQ )} spids: [7286] ) ] spids: [7286] ) ] ) ] spids: [7266 7268 7290 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$NEW'))} {(Lit_Other '=')} {(DQ (Y))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_CMD spids:[7312]) op: Equal rhs: {(DQ )} spids: [7312] ) ] spids: [7312] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_CMD spids:[7317]) op: Equal rhs: { (DQ ($ VSub_Name '$_CMD') ($ VSub_Name '$LINE') ($ VSub_Name '$NL') ) } spids: [7317] ) ] spids: [7317] ) ] spids: [7293 7294 7323 16777215] ) ] spids: [6990 6996 7326] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NEW spids:[7329]) op: Equal rhs: {(DQ )} spids: [7329] ) ] spids: [7329] ) ] spids: [6801 7334] ) ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:CMD spids:[7338]) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$_CMD'))}) (C {(sed)} {(-e)} { (DQ (s/) (Lit_Other '\\') ("'/") (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (/g) ) } {(-e)} {(SQ <'s/\\"\\([^\\"]*\\)\\"/\\"\\\\\\"\\1\\\\\\"\\"/g'>)} {(-e)} {(SQ <'s/\\([<>!=][<>!=]*\\)/ \\1 /g'>)} {(-e)} {(SQ <'s/</\\\\\\</g'>)} {(-e)} {(SQ <'s/>/\\\\\\>/g'>)} {(-e)} {(SQ <'s/\\*/\\\\\\*/g'>)} {(-e)} {(SQ <'s/(/ \\\\\\( /g'>)} {(-e)} {(SQ <'s/)/ \\\\\\) /g'>)} ) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [7339 7417] ) } spids: [7338] ) ] spids: [7338] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$CMD'))} {(Lit_Other ']')}) (ControlFlow token:<ControlFlow_Continue continue>) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:IFS spids:[7435]) op: Equal rhs: {(DQ ($ VSub_Name '$_IFS') (','))} spids: [7435] ) ] spids: [7435] ) (C {(eval)} {(set)} {(X)} {($ VSub_Name '$CMD')}) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:IFS spids:[7454]) op: Equal rhs: {(DQ ($ VSub_Name '$_IFS'))} spids: [7454] ) ] spids: [7454] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NEW spids:[7460]) op: Equal rhs: {(DQ (Y))} spids: [7460] ) ] spids: [7460] ) (Case to_match: {($ VSub_Number '$1')} arms: [ (case_arm pat_list: [{(select)}] action: [(C {(select_)} {(DQ ($ VSub_At '$@'))})] spids: [7473 7474 7481 16777215] ) (case_arm pat_list: [{(create)}] action: [(C {(create)} {(DQ ($ VSub_At '$@'))})] spids: [7485 7486 7493 16777215] ) (case_arm pat_list: [{(delete)}] action: [(C {(delete)} {(DQ ($ VSub_At '$@'))})] spids: [7496 7497 7504 16777215] ) (case_arm pat_list: [{(drop)}] action: [(C {(drop)} {(DQ ($ VSub_At '$@'))})] spids: [7507 7508 7515 16777215] ) (case_arm pat_list: [{(insert)}] action: [(C {(insert)} {(DQ ($ VSub_At '$@'))})] spids: [7518 7519 7526 16777215] ) (case_arm pat_list: [{(update)}] action: [(C {(update)} {(DQ ($ VSub_At '$@'))})] spids: [7529 7530 7537 16777215] ) (case_arm pat_list: [{(edit)}] action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other ']')}) (C {($ VSub_Name '$EDITOR')} {($ VSub_Number '$2') (Lit_Other '@')}) ] ) ] spids: [7540 7541 7557 16777215] ) (case_arm pat_list: [{(help)}] action: [(C {(help)} {(DQ ($ VSub_At '$@'))})] spids: [7560 7561 7568 16777215] ) (case_arm pat_list: [{(print)}] action: [ (C {(select_)} {(DQ (select))} {(SQ <'*'>)} {(DQ (from))} {(DQ ($ VSub_Number '$2'))}) ] spids: [7571 7572 7591 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (SimpleCommand words: [{(echo)} {(DQ ('Missing or unrecognized command.'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) ] spids: [7594 7595 7606 16777215] ) ] spids: [7466 7470 7609] ) ] spids: [6793 7611] ) ) ] )