(CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:SHQL_ROOT) op:Equal rhs:{(DQ (/u/shql))} spids:[19])] spids: [19] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:EDITOR) 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) 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) op:Equal rhs:{(mawk)} spids:[59])] spids: [59] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:DEBUG) op:Equal rhs:{(DQ (N))} spids:[67])] spids: [67] ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$DEBUG'))} {(Lit_Other '=')} {(DQ (Y))} {(Lit_Other ']')}) (C {(set)} {(-x)}) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:UMASK) 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: False ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:NOCR1) op:Equal rhs:{(SQ <-n>)} spids:[174])] spids: [174] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:NOCR2) op:Equal rhs:{(DQ )} spids:[183])] spids: [183] ) ] spids: [-1 168] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:NOCR1) op:Equal rhs:{(DQ )} spids:[190])] spids: [190] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:NOCR2) op:Equal rhs:{(SQ <'\\c'>)} spids:[198])] spids: [198] ) ] spids: [187 203] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:NL) op:Equal rhs:{(SQ <'\n'>)} spids:[205])] spids: [205] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:TAB) 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) 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) op:Equal rhs:{(DQ (Y))} spids:[257])] spids: [257] ) (C {(shift)}) ] spids: [-1 255] ) ] spids: [-1 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_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[293])] ) (SimpleCommand words: [ {(echo)} {(DQ ('The database name must be a directory under ') ($ VSub_Name '$HOME') (/shql))} ] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[305])] ) (SimpleCommand words: [{(echo)} {(DQ ('\tor a directory under ') ($ VSub_Name '$SHQL_ROOT'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[316])] ) (C {(exit)} {(1)}) ] spids: [-1 285] ) ] spids: [-1 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: [-1 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_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[420])] ) (SimpleCommand words: [ {(echo)} {(DQ ('The database name must be a directory under ') ($ VSub_Name '$HOME') (/shql))} ] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[432])] ) (SimpleCommand words: [{(echo)} {(DQ ('\tor a directory under ') ($ VSub_Name '$SHQL_ROOT'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[443])] ) (C {(exit)} {(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_id: Redir_DLess fd: -1 body: {('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') } do_expansion: False here_end: END was_filled: True spids: [487] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [482 483 496 -1] ) (case_arm pat_list: [{(delete)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {('DELETE \n') ('FROM table_name\t\n') ('{ WHERE where_clause }\n')} do_expansion: False here_end: END was_filled: True spids: [504] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [499 500 513 -1] ) (case_arm pat_list: [{(drop)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {('DROP TABLE table_name\n') ('or\n') ('DROP VIEW view_name\n')} do_expansion: False here_end: END was_filled: True spids: [521] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [516 517 530 -1] ) (case_arm pat_list: [{(edit)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {('EDIT table_name\n') ( "is a non-standard method of changing a table's field names or display widths.\n" ) } do_expansion: False here_end: END was_filled: True spids: [538] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [533 534 547 -1] ) (case_arm pat_list: [{(help)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {('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') } do_expansion: False here_end: END was_filled: True spids: [555] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [550 551 564 -1] ) (case_arm pat_list: [{(insert)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {('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') } do_expansion: False here_end: END was_filled: True spids: [572] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [567 568 581 -1] ) (case_arm pat_list: [{(print)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {('PRINT table_name \n') ('is a non-standard synonym for SELECT * FROM table_name.\n') } do_expansion: False here_end: END was_filled: True spids: [589] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [584 585 598 -1] ) (case_arm pat_list: [{(select)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {('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") } do_expansion: False here_end: END was_filled: True spids: [606] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [601 602 615 -1] ) (case_arm pat_list: [{(update)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {('UPDATE table_name\n') ('SET column_name = expression {, ... }\n') ('{ WHERE where_clause }\n') } do_expansion: False here_end: END was_filled: True spids: [623] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [618 619 632 -1] ) (case_arm pat_list: [{(where)}] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: { ( 'WHERE [ column_name | value ] [ =, !=, >, <, >=, <=, and, or, not, in ]\n' ) (' [ column_name | value | subselect ]\n') ('Parentheses may be used to group expressions. \n') } do_expansion: False here_end: END was_filled: True spids: [640] ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [635 636 649 -1] ) (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: [652 653 740 -1] ) ] spids: [473 479 743] ) (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) 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: [789 802] ) ) } spids: [787] ) ] spids: [787] ) ] spids: [-1 785] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RESULT) 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: False ) ] ) left_token: <Left_Backtick '`'> spids: [810 829] ) ) } spids: [808] ) ] spids: [808] ) ] spids: [806 833] ) (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) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [852] ) ] spids: [852] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [-1 850] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:OUTFIELDNUM) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ ($ VSub_Name '$RESULT'))} {(Lit_Other ':')} {(SQ <'\\([^:]*\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [867 879] ) ) } spids: [865] ) ] spids: [865] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:OUTFIELD) op: Equal rhs: { (DQ (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ($ VSub_Name '$OUTFIELDNUM') ) } spids: [883] ) ] spids: [883] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [863 896] ) ] spids: [768] ) spids: [765 768] ) (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) op: Equal rhs: {(SQ <total>)} spids: [939] ) ] spids: [939] ) ] spids: [-1 937] ) (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) op: Equal rhs: {(SQ <'(total/cnt)'>)} spids: [965] ) ] spids: [965] ) ] spids: [945 963] ) (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) op: Equal rhs: {(SQ <cnt>)} spids: [991] ) ] spids: [991] ) ] spids: [971 989] ) (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) op: Equal rhs: {(SQ <min>)} spids: [1017] ) ] spids: [1017] ) ] spids: [997 1015] ) (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) op: Equal rhs: {(SQ <max>)} spids: [1043] ) ] spids: [1043] ) ] spids: [1023 1041] ) ] else_action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})] spids: [1049 1056] ) (AndOr 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 ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Bad aggregate syntax'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[1099])] ) (AndOr children: [ (C {(syntax)} {(select)}) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:AGGFIELD) op: Equal rhs: {(DQ ($ VSub_Number '$3'))} spids: [1115] ) ] spids: [1115] ) (C {(shift)} {(4)}) (C {(lookup_field)} {(DQ ($ VSub_Name '$AGGFIELD'))}) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')}) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Bad field name (') ($ VSub_Number '$1') (')'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[1155])] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (While cond: [(C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-ne)} {(0)} {(Lit_Other ']')})] body: (DoGroup children: [ (Sentence child: (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xwhere))} {(Lit_Other ']')} ) (ControlFlow token:<ControlFlow_Break break>) ] op_id: Op_DAmp ) terminator: <Op_Semi ';'> ) (Sentence child: (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xorder))} {(Lit_Other ']')} ) (ControlFlow token:<ControlFlow_Break break>) ] op_id: Op_DAmp ) terminator: <Op_Semi ';'> ) (Sentence child: (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xunion))} {(Lit_Other ']')} ) (ControlFlow token:<ControlFlow_Break break>) ] op_id: Op_DAmp ) terminator: <Op_Semi ';'> ) (C {(shift)}) ] spids: [1178 1248] ) ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:OUTFIELD) 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) op: Equal rhs: {(DQ (Y))} spids: [1256] ) ] spids: [1256] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:AGGREGATE) op: Equal rhs: {(DQ (Y))} spids: [1263] ) ] spids: [1263] ) terminator: <Op_Semi ';'> ) (C {(select_)} {(DQ (select))} {(DQ ($ VSub_Name '$AGGFIELD'))} {(DQ (from))} {(DQ ($ VSub_Name '$TABLE'))} {(DQ ($ VSub_At '$@'))} ) ] ) spids: [1254 1292] ) (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: False ) ] ) left_token: <Left_Backtick '`'> spids: [1253 1318] ) } spids: [1252] ) ] spids: [1252] ) (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: [1325 1337] ) } {(-lt)} {(10)} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RESULT) op: Equal rhs: {(DQ ($ VSub_Name '$AGGFIELD') ('\t10'))} spids: [1348] ) ] spids: [1348] ) ] spids: [-1 1346] ) ] spids: [-1 1355] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [916] ) spids: [913 916] ) (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) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [1390] ) ] spids: [1390] ) (C {(lookup_field)} {(DQ ($ VSub_Number '$2'))}) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')}) (AndOr children: [ (SimpleCommand words: [ {(echo)} { (DQ ('Bad view specifcation (') ($ VSub_Number '$1') (.) ($ VSub_Number '$2') (')') ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[1428])] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:JFIELD1) op: Equal rhs: {(DQ ($ VSub_Name '$OUTFIELDNUM'))} spids: [1438] ) ] spids: [1438] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:JFIELD1L1) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(expr)} {($ VSub_Name '$JFIELD1')} {(-)} {(1)})] ) left_token: <Left_Backtick '`'> spids: [1446 1454] ) ) } spids: [1444] ) ] spids: [1444] ) (C {(update_view)} {(DQ ($ VSub_Number '$3'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE) op: Equal rhs: {(DQ ($ VSub_Number '$3'))} spids: [1465] ) ] spids: [1465] ) (C {(lookup_field)} {(DQ ($ VSub_Number '$4'))}) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')}) (AndOr children: [ (SimpleCommand words: [ {(echo)} { (DQ ('Bad view specifcation (') ($ VSub_Number '$3') (.) ($ VSub_Number '$4') (')') ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[1503])] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:JFIELD2) op: Equal rhs: {(DQ ($ VSub_Name '$OUTFIELDNUM'))} spids: [1513] ) ] spids: [1513] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:JFIELD2L1) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(expr)} {($ VSub_Name '$JFIELD2')} {(-)} {(1)})] ) left_token: <Left_Backtick '`'> spids: [1521 1529] ) ) } spids: [1519] ) ] spids: [1519] ) (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_id: Redir_Great fd: -1 arg_word: {($ VSub_Number '$5') (Lit_Other '@')} spids: [1581] ) ] spids: [1534 1579] ) (SimpleCommand words: [ {(sort)} {(-t) (EscapedLiteralPart token:<Lit_EscapedChar '\\\t'>)} {(Lit_Other '+') ($ VSub_Name '$JFIELD2L1')} {($ VSub_Number '$3') (Lit_Tilde '~')} ] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/tmp/) ($ VSub_Dollar '$$')} spids: [1598] ) ] ) (Pipeline children: [ (C {(sort)} {(-t) (EscapedLiteralPart token:<Lit_EscapedChar '\\\t'>)} {(Lit_Other '+') ($ VSub_Name '$JFIELD1L1')} {($ VSub_Number '$1') (Lit_Tilde '~')} ) (SimpleCommand words: [ {(join)} {(-t) (EscapedLiteralPart token:<Lit_EscapedChar '\\\t'>)} {(-j1)} {($ VSub_Name '$JFIELD1')} {(-j2)} {($ VSub_Name '$JFIELD2')} {(-)} {(/tmp/) ($ VSub_Dollar '$$')} ] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Number '$5') (Lit_Tilde '~')} spids: [1639] ) ] ) ] negated: False ) ] spids: [1380] ) spids: [1377 1380] ) (FuncDef name: update_view body: (BraceGroup children: [ (AndOr children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Number '$1') ('%'))} {(Lit_Other ']')} ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] op_id: Op_DAmp ) (Subshell child: (C {(do_join)} { (CommandSubPart command_list: (CommandList children: [(C {(cat)} {($ VSub_Number '$1') (Lit_Other '%')})] ) left_token: <Left_Backtick '`'> spids: [1689 1694] ) } ) spids: [1685 1696] ) ] spids: [1662] ) spids: [1659 1662] ) (FuncDef name: where body: (BraceGroup children: [ (C {(shift)}) (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) op: Equal rhs: {(DQ (Y))} spids: [1792] ) ] spids: [1792] ) terminator: <Op_Semi ';'> ) (C {(select_)} {(DQ ($ VSub_At '$@'))}) ] ) spids: [1790 1803] ) ] ) left_token: <Left_Backtick '`'> spids: [1789 1804] ) } ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-eq)} {(0)} {(Lit_Other ']')} ) ] action: [(C {(shift)})] spids: [-1 1822] ) ] else_action: [ (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] spids: [1827 1834] ) ] spids: [-1 1782] ) ] spids: [-1 1837] ) (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) op: Equal rhs: {(DQ ($ VSub_Name '$WHERE') (' && '))} spids: [1852] ) ] spids: [1852] ) ] spids: [1849 1850 1857 -1] ) (case_arm pat_list: [{(or)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE) op: Equal rhs: {(DQ ($ VSub_Name '$WHERE') (' || '))} spids: [1863] ) ] spids: [1863] ) ] spids: [1860 1861 1868 -1] ) (case_arm pat_list: [{(not)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE) op: Equal rhs: {(DQ ($ VSub_Name '$WHERE') (' !'))} spids: [1874] ) ] spids: [1874] ) ] spids: [1871 1872 1880 -1] ) (case_arm pat_list: [{(Lit_Other '=')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE) op: Equal rhs: {(DQ ($ VSub_Name '$WHERE') (' == '))} spids: [1886] ) ] spids: [1886] ) ] spids: [1883 1884 1891 -1] ) (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) op: Equal rhs: {(SQ <Y>)} spids: [1909] ) ] spids: [1909] ) terminator: <Op_Semi ';'> ) (C {(select_)} {(DQ ($ VSub_At '$@'))}) ] ) spids: [1907 1920] ) ] ) left_token: <Left_Backtick '`'> spids: [1906 1921] ) } ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-eq)} {(0)} {(Lit_Other ']')} ) ] action: [(C {(shift)})] spids: [-1 1939] ) ] else_action: [ (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] spids: [1944 1951] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:INWHERE) op: Equal rhs: {(DQ )} spids: [1954] ) ] spids: [1954] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMP) op: Equal rhs: {(DQ ('=='))} spids: [1959] ) ] spids: [1959] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LOGIC) op: Equal rhs: {(DQ ('||'))} spids: [1965] ) ] spids: [1965] ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Name '$LAST'))} {(Lit_Other '=')} {(DQ (Xnot))} {(Lit_Other ']')} ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMP) op: Equal rhs: {(DQ ('='))} spids: [1988] ) ] spids: [1988] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LOGIC) op: Equal rhs: {(DQ ('&&'))} spids: [1995] ) ] spids: [1995] ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (ForEach iter_name: VALUE do_arg_iter: True body: (DoGroup children: [ (AndOr 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) op: Equal rhs: { (DQ ($ VSub_Name '$INWHERE') (' ') ($ VSub_Name '$LOGIC') ) } spids: [2029] ) ] spids: [2029] ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:INWHERE) op: Equal rhs: { (DQ ($ VSub_Name '$INWHERE') (' (') ($ VSub_Name '$WHERE') ($ VSub_Name '$COMP') (' ') ($ VSub_Name '$VALUE') (') ') ) } spids: [2037] ) ] spids: [2037] ) ] spids: [2006 2049] ) spids: [-1 -1] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE) op: Equal rhs: {(DQ ($ VSub_Name '$INWHERE'))} spids: [2052] ) ] spids: [2052] ) (ControlFlow token:<ControlFlow_Break break>) ] spids: [1895 1897 2059 -1] ) (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) op: Equal rhs: {(DQ ($ VSub_Name '$WHERE') (' ') ($ VSub_Name '$OUTFIELD'))} spids: [2072] ) ] spids: [2072] ) ] spids: [2062 2063 2078 -1] ) ] spids: [1840 1846 2081] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LAST) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [2084] ) ] spids: [2084] ) (C {(shift)}) ] spids: [1761 2093] ) ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$WHERE'))} {(Lit_Other ']')}) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE) op: Equal rhs: {(DQ (' ( ') ($ VSub_Name '$WHERE') (' ) '))} spids: [2107] ) ] spids: [2107] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (SimpleCommand words: [{(echo)} {(DQ ("Missing 'where' clause"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[2127])] ) (C {(syntax)} {(where)}) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [1716] ) spids: [1713 1716] ) (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_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[2182])] ) terminator: <Op_Semi ';'> ) (C {(syntax)} {(help)}) ] spids: [-1 2174] ) (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_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [2219] ) ] ) (C {(cut)} {(-d) (Lit_Other '@')} {(-f1)}) (C {(cut)} {(-d) (Lit_Other '%')} {(-f1)}) (C {(uniq)}) ] negated: False ) ] spids: [2192 2209] ) (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_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [2273] ) ] ) (C {(cut)} {(-d) (Lit_Other '@')} {(-f1)}) (C {(cut)} {(-d) (Lit_Other '%')} {(-f1)}) (C {(uniq)} {(-u)}) ] negated: False ) ] spids: [2245 2263] ) (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_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [2327] ) ] ) (C {(cut)} {(-d) (Lit_Other '%')} {(-f1)}) ] negated: False ) ] spids: [2302 2320] ) (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other '=')} {(DQ (commands))} {(Lit_Other ']')} ) ] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {('/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' ) } do_expansion: False here_end: END was_filled: True spids: [2362] ) ] ) ] spids: [2341 2358] ) ] else_action: [ (AndOr children: [ (C {(syntax)} {($ VSub_Number '$2')}) (ControlFlow token:<ControlFlow_Return return>) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [2380] ) ] spids: [2380] ) (C {(update_view)} {(DQ ($ VSub_Name '$TABLE'))}) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Number '$2') ('@'))} {(Lit_Other ']')}) ] action: [ (AndOr children: [ (C {(echo)} {(DQ ($ VSub_Name '$NL') (' <') ($ VSub_Number '$2') ('>'))}) (C {(cat)} {(DQ ($ VSub_Number '$2') ('@'))}) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other '[')} {(-f)} {(DQ (${ VSub_Number 2) ('%'))} {(Lit_Other ']')}) (AndOr children: [ (C {(echo)} {($ VSub_Name '$NOCR1')} {(DQ ($ VSub_Name '$NL') (' View:\t') ($ VSub_Name '$NOCR2'))} ) (AndOr children: [ (C {(set)} {(X)} { (CommandSubPart command_list: (CommandList children: [ (C {(cat)} {($ VSub_Number '$2') (Lit_Other '%')}) ] ) left_token: <Left_Backtick '`'> spids: [2461 2466] ) } ) (AndOr children: [ (C {(shift)}) (C {(echo)} { (DQ ($ VSub_Number '$1') (.) ($ VSub_Number '$2') (' = ') ($ VSub_Number '$3') (.) ($ VSub_Number '$4') ) } ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (C {(echo)} {(DQ ($ VSub_Name '$NL') (' Rows:\t')) (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(cat)} {($ VSub_Name '$TABLE') (Lit_Tilde '~')}) (C {(wc)} {(-l)}) ] negated: False ) ] ) left_token: <Left_Backtick '`'> spids: [2494 2505] ) } ) ] spids: [-1 2408] ) ] else_action: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$TABLE') (' does not exist.'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[2517])] ) (C {(syntax)} {(help)}) ] spids: [2508 2526] ) ] spids: [2369 2529] ) ] spids: [2158] ) spids: [2155 2158] ) (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_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[2586])] ) ] spids: [-1 2578] ) (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: [-1 2634] ) ] else_action: [ (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$2'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X('))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Bad syntax'))}] redirects: [ (Redir op_id: Redir_GreatAnd fd: 1 arg_word: {(2)} spids: [2669] ) ] ) (AndOr children: [ (C {(syntax)} {(create)}) (ControlFlow token: <ControlFlow_Return return> ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE1) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Number '$3')} {(Lit_Other ':')} {(SQ <'\\([^\\.]*\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [2687 2697] ) ) } spids: [2685] ) ] spids: [2685] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FIELD1) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Number '$3')} {(Lit_Other ':')} {(SQ <'[^\\.]*.\\(.*\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [2703 2713] ) ) } spids: [2701] ) ] spids: [2701] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE) op: Equal rhs: {(DQ ($ VSub_Name '$TABLE1'))} spids: [2717] ) ] spids: [2717] ) (C {(lookup_field)} {(DQ ($ VSub_Name '$FIELD1'))}) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Bad table or field name'))}] redirects: [ (Redir op_id: Redir_GreatAnd fd: 1 arg_word: {(2)} spids: [2751] ) ] ) (ControlFlow token: <ControlFlow_Return return> ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$4'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X='))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Bad syntax'))}] redirects: [ (Redir op_id: Redir_GreatAnd fd: 1 arg_word: {(2)} spids: [2784] ) ] ) (AndOr children: [ (C {(syntax)} {(create)}) (ControlFlow token: <ControlFlow_Return return> ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE2) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Number '$5')} {(Lit_Other ':')} {(SQ <'\\([^\\.]*\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [2802 2812] ) ) } spids: [2800] ) ] spids: [2800] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FIELD2) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Number '$5')} {(Lit_Other ':')} {(SQ <'[^\\.]*.\\(.*\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [2818 2828] ) ) } spids: [2816] ) ] spids: [2816] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE) op: Equal rhs: {(DQ ($ VSub_Name '$TABLE2'))} spids: [2832] ) ] spids: [2832] ) (C {(lookup_field)} {(DQ ($ VSub_Name '$FIELD2'))}) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Bad table or field name'))}] redirects: [ (Redir op_id: Redir_GreatAnd fd: 1 arg_word: {(2)} spids: [2866] ) ] ) (ControlFlow token: <ControlFlow_Return return> ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$2'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X('))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Bad syntax'))}] redirects: [ (Redir op_id: Redir_GreatAnd fd: 1 arg_word: {(2)} spids: [2899] ) ] ) (AndOr children: [ (C {(syntax)} {(create)}) (ControlFlow token: <ControlFlow_Return return> ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (SimpleCommand words: [ {(echo)} { (DQ ($ VSub_Name '$TABLE1') (' ') ($ VSub_Name '$FIELD1') (' ') ($ VSub_Name '$TABLE2') (' ') ($ VSub_Name '$FIELD2') (' ') ($ VSub_Number '$1') ) } ] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Number '$1') (Lit_Other '%')} spids: [2929] ) ] ) (C {(update_view)} {(DQ ($ VSub_Number '$1'))}) ] spids: [2641 2943] ) (C {(echo)} {(DQ (OK))}) ] spids: [2590 2616] ) (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xtable))} {(-a)} {($ VSub_Pound '$#')} {(-ge)} {(5)} {(Lit_Other ']')} ) ] action: [ (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$3'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X('))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Bad syntax'))}] redirects: [ (Redir op_id: Redir_GreatAnd fd: 1 arg_word: {(2)} spids: [3007] ) ] ) (AndOr children: [ (C {(syntax)} {(create)}) (ControlFlow token: <ControlFlow_Return return> ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [3023] ) ] spids: [3023] ) (C {(shift)} {(3)}) (SimpleCommand redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name '$TABLE') (Lit_Other '@')} spids: [3034] ) ] ) (SimpleCommand redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name '$TABLE') (Lit_Tilde '~')} spids: [3040] ) ] ) (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_id: Redir_DGreat fd: -1 arg_word: {($ VSub_Name '$TABLE') (Lit_Other '@')} spids: [3070] ) ] ) (C {(shift)} {(2)}) ] spids: [3059 3081] ) ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X)'))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Bad syntax'))}] redirects: [ (Redir op_id: Redir_GreatAnd fd: 1 arg_word: {(2)} spids: [3108] ) ] ) (AndOr children: [ (C {(rm)} {(-f)} {($ VSub_Name '$TABLE') (Lit_Other '[') (Lit_Other '@') (Lit_Tilde '~') (Lit_Other ']') } ) (AndOr children: [ (C {(syntax)} {(create)}) (ControlFlow token: <ControlFlow_Return return> ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (C {(echo)} {(DQ (OK))}) ] spids: [2953 2980] ) ] else_action: [ (SimpleCommand words: [{(echo)} {(DQ ('Improper syntax (') ($ VSub_Number '$1') (')'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[3155])] ) (C {(syntax)} {(create)}) ] spids: [3143 3164] ) (ControlFlow token:<ControlFlow_Return return>) ] spids: [2549] ) spids: [2546 2549] ) (FuncDef name: drop body: (BraceGroup children: [ (AndOr 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 ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Syntax error.'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[3228])] ) (AndOr children: [ (C {(syntax)} {(drop)}) (ControlFlow token:<ControlFlow_Return return>) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other '=')} {(DQ (table))} {(-a)} {(-f)} {(DQ ($ VSub_Number '$3') ('%'))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [ {(echo)} {(DQ ('Can not drop, ') ($ VSub_Number '$2') (' is a view, not a table'))} ] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[3276])] ) (ControlFlow token:<ControlFlow_Return return>) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other '=')} {(DQ (view))} {(-a)} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Number '$3') ('%'))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Can not drop, ') ($ VSub_Number '$2') (' is not a view'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[3320])] ) (ControlFlow token:<ControlFlow_Return return>) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (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_Tilde '~')} {($ VSub_Number '$3') (Lit_Other '%')} ) (C {(echo)} {(DQ (OK))}) ] spids: [-1 3352] ) ] else_action: [ (SimpleCommand words: [{(echo)} {(DQ ('No such table'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[3383])] ) ] spids: [3375 3387] ) ] spids: [3187] ) spids: [3184 3187] ) (FuncDef name: insert body: (BraceGroup children: [ (C {(shift)}) (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (Xinto))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Improper syntax (') ($ VSub_Number '$1') (')'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[3439])] ) (AndOr children: [ (C {(syntax)} {(insert)}) (ControlFlow token:<ControlFlow_Return return>) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [3458] ) ] spids: [3458] ) (AndOr children: [ (C {(update_view)} {(DQ ($ VSub_Name '$TABLE'))}) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Can not insert into a view'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[3478])] ) (ControlFlow token:<ControlFlow_Return return>) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Name '$TABLE') ('@'))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Table does not exist'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[3507])] ) (ControlFlow token:<ControlFlow_Return return>) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ATTRIB) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(cat)} {($ VSub_Name '$TABLE') (Lit_Other '@')}) (C {(wc)} {(-l)}) ] negated: False ) ] ) left_token: <Left_Backtick '`'> spids: [3520 3531] ) ) } spids: [3518] ) ] spids: [3518] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:XASGN) op:Equal rhs:{(DQ )} spids:[3535])] spids: [3535] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:XECHO) op: Equal rhs: {(DQ ('echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>))} spids: [3540] ) ] spids: [3540] ) (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) op: Equal rhs: {(DQ (0))} spids: [3575] ) ] spids: [3575] ) (C {(shift)}) (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 children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [ {(echo)} {(DQ ('Bad field name. (') ($ VSub_Number '$1') (')'))} ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 1 arg_word: {(2)} spids: [3644] ) ] ) (ControlFlow token: <ControlFlow_Return return> ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:XASGN) 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: [3655] ) ] spids: [3655] ) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ATTRIB2) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Name '$ATTRIB2')} {(Lit_Other '+')} {(1)} ) ] ) left_token: <Left_Backtick '`'> spids: [3674 3682] ) } spids: [3673] ) ] spids: [3673] ) ] spids: [3611 3685] ) ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X)'))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Syntax error (') ($ VSub_Number '$1') (')'))}] redirects: [ (Redir op_id: Redir_GreatAnd fd: 1 arg_word: {(2)} spids: [3714] ) ] ) (AndOr children: [ (C {(syntax)} {(insert)}) (ControlFlow token: <ControlFlow_Return return> ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POS) op: Equal rhs: {(DQ (1))} spids: [3733] ) ] spids: [3733] ) (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 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) op: Equal rhs: { (DQ ($ VSub_Name '$XECHO') (EscapedLiteralPart token: <Lit_EscapedChar '\\$'> ) (TAB) ) } spids: [3785] ) ] spids: [3785] ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:XECHO) op: Equal rhs: { (DQ ($ VSub_Name '$XECHO') (EscapedLiteralPart token: <Lit_EscapedChar '\\$'> ) (X) ($ VSub_Name '$POS') ) } spids: [3793] ) ] spids: [3793] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POS) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Name '$POS')} {(Lit_Other '+')} {(1)}) ] ) left_token: <Left_Backtick '`'> spids: [3803 3811] ) } spids: [3802] ) ] spids: [3802] ) ] spids: [3756 3814] ) ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:XECHO) op: Equal rhs: { (DQ ($ VSub_Name '$XECHO') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ) } spids: [3817] ) ] spids: [3817] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ATTRIB) op: Equal rhs: {(DQ ($ VSub_Name '$ATTRIB2'))} spids: [3824] ) ] spids: [3824] ) ] spids: [-1 3573] ) ] spids: [-1 3830] ) (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) op: Equal rhs: {(SQ <Y>)} spids: [3864] ) ] spids: [3864] ) terminator: <Op_Semi ';'> ) (C {(select_)} {(DQ ($ VSub_At '$@'))}) ] ) spids: [3862 3877] ) ] ) left_token: <Left_Backtick '`'> spids: [3861 3878] ) (' ') (EscapedLiteralPart token:<Lit_EscapedChar '\\)'>) ) } ) (C {(shift)}) ] spids: [-1 3852] ) (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 children: [ (SimpleCommand words: [{(echo)} {(DQ ('Improper syntax (') ($ VSub_Number '$1') (')'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[3931])] ) (AndOr children: [ (C {(syntax)} {(insert)}) (ControlFlow token: <ControlFlow_Return return> ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [3887 3921] ) ] else_action: [(C {(shift)} {(2)})] spids: [3947 3954] ) (ForEach iter_name: LAST do_arg_iter: True body: (DoGroup children: [(Sentence child:(C {(Lit_Other ':')}) terminator:<Op_Semi ';'>)] spids: [3961 3969] ) spids: [-1 -1] ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Name '$LAST'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ('X)'))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Improper syntax'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[3998])] ) (AndOr children: [ (C {(syntax)} {(insert)}) (ControlFlow token:<ControlFlow_Return return>) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (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: [4017 4033] ) ) } {(-ne)} {(0)} {(Lit_Other ']')} ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ('Incorrect number of values.'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[4051])] ) ] spids: [-1 4043] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ROWS) 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: [4059 4075] ) ) } spids: [4057] ) ] spids: [4057] ) (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: [4121 4127] ) ($ VSub_Name '$NOCR2') ) } ] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {($ VSub_Name '$TABLE') (Lit_Tilde '~')} spids: [4131] ) ] ) (C {(shift)}) (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: [4146 4162] ) ) } {(-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: [4181 4187] ) ($ VSub_Name '$NOCR2') ) } ] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {($ VSub_Name '$TABLE') (Lit_Tilde '~')} spids: [4192] ) ] ) (C {(shift)}) ] spids: [4172 4201] ) ) (SimpleCommand words: [{(echo)} {(DQ )}] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {($ VSub_Name '$TABLE') (Lit_Tilde '~')} spids: [4209] ) ] ) ] spids: [-1 4112] ) ] else_action: [ (C {(eval)} {($ VSub_Name '$XASGN')}) (SimpleCommand words: [{(eval)} {($ VSub_Name '$XECHO')}] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {($ VSub_Name '$TABLE') (Lit_Tilde '~')} spids: [4226] ) ] ) ] spids: [4215 4232] ) ] spids: [4092 4235] ) ) (C {(echo)} {(DQ ('(') ($ VSub_Name '$ROWS') (' rows)'))}) ] spids: [4055 4248] ) ] spids: [3407] ) spids: [3404 3407] ) (FuncDef name: delete body: (BraceGroup children: [ (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [4274] ) ] spids: [4274] ) (AndOr children: [ (C {(update_view)} {(DQ ($ VSub_Name '$TABLE'))}) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('You can not delete from a view.'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[4294])] ) (ControlFlow token:<ControlFlow_Return return>) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Name '$TABLE') ('@'))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$TABLE') (' does not exit.'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[4326])] ) (ControlFlow token:<ControlFlow_Return return>) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:WHERE) op:Equal rhs:{(DQ )} spids:[4334])] spids: [4334] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$3'))} {(Lit_Other '=')} {(DQ (Xwhere))} {(Lit_Other ']')} ) ] action: [ (C {(shift)} {(2)}) (AndOr children: [ (C {(where)} {(DQ ($ VSub_At '$@'))}) (AndOr children: [ (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_Tilde '~')} ] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/tmp/) ($ VSub_Dollar '$$')} spids: [4405] ) ] ) (AndOr children: [ (C {(mv)} {(/tmp/) ($ VSub_Dollar '$$')} {($ VSub_Name '$TABLE') (Lit_Tilde '~')} ) (C {(cat)} {(/tmp/) ($ VSub_Dollar '$$') (row)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [-1 4357] ) ] else_action: [ (C {(echo)} {(SQ <'('>) (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(cat)} {($ VSub_Name '$TABLE') (Lit_Tilde '~')}) (C {(wc)} {(-l)}) ] negated: False ) ] ) left_token: <Left_Backtick '`'> spids: [4438 4449] ) (SQ <' rows)'>) } ) (SimpleCommand redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name '$TABLE') (Lit_Tilde '~')} spids: [4456] ) ] ) ] spids: [4431 4462] ) ] spids: [4268] ) spids: [4265 4268] ) (FuncDef name: update body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [4485] ) ] spids: [4485] ) (AndOr children: [ (C {(update_view)} {(DQ ($ VSub_Name '$TABLE'))}) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Can not update a view.'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[4505])] ) (ControlFlow token:<ControlFlow_Return return>) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Name '$TABLE') ('@'))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$TABLE') (' does not exit.'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[4535])] ) (ControlFlow token:<ControlFlow_Return return>) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$3'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (Xset))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Improper syntax.'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[4567])] ) (AndOr children: [ (C {(syntax)} {(update)}) (ControlFlow token:<ControlFlow_Return return>) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (C {(shift)} {(3)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ASSIGN) op:Equal rhs:{(DQ )} spids:[4588])] spids: [4588] ) (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 children: [ (C {(lookup_field)} {(DQ ($ VSub_Number '$1'))}) (AndOr children: [ (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) op: Equal rhs: {(DQ ($ VSub_Name '$ASSIGN') (' ; '))} spids: [4648] ) ] spids: [4648] ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ASSIGN) op: Equal rhs: {(DQ ($ VSub_Name '$ASSIGN') (' ') ($ VSub_Name '$OUTFIELD'))} spids: [4655] ) ] spids: [4655] ) (C {(shift)}) ] spids: [4620 4666] ) ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:WHERE) op:Equal rhs:{(DQ )} spids:[4669])] spids: [4669] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xwhere))} {(Lit_Other ']')} ) ] action: [ (AndOr children: [ (C {(where)} {(DQ ($ VSub_At '$@'))}) (ControlFlow token:<ControlFlow_Return return>) ] op_id: Op_DPipe ) ] spids: [-1 4693] ) ] spids: [-1 4707] ) (AndOr 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_Tilde '~')} ] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/tmp/) ($ VSub_Dollar '$$')} spids: [4749] ) ] ) (AndOr children: [ (C {(mv)} {(/tmp/) ($ VSub_Dollar '$$')} {($ VSub_Name '$TABLE') (Lit_Tilde '~')}) (C {(cat)} {(/tmp/) ($ VSub_Dollar '$$') (row)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [4482] ) spids: [4479 4482] ) (FuncDef name: select_ body: (BraceGroup children: [ (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$DEBUG'))} {(Lit_Other '=')} {(DQ (Y))} {(Lit_Other ']')} ) (C {(set)} {(-x)}) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:UNION) op:Equal rhs:{(DQ (Y))} spids:[4818])] spids: [4818] ) (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) op: Equal rhs: {(DQ )} spids: [4844] ) ] spids: [4844] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:FROM) op:Equal rhs:{(DQ )} spids:[4849])] spids: [4849] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:UNION) op: Equal rhs: {(DQ )} spids: [4854] ) ] spids: [4854] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE) op: Equal rhs: {(DQ )} spids: [4859] ) ] spids: [4859] ) (ForEach iter_name: ATABLE do_arg_iter: True body: (DoGroup children: [ (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Name '$ATABLE'))} {(Lit_Other '=')} {(DQ (Xwhere))} {(Lit_Other ']')} ) (ControlFlow token: <ControlFlow_Break break> ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Name '$ATABLE'))} {(Lit_Other '=')} {(DQ (Xorder))} {(Lit_Other ']')} ) (ControlFlow token: <ControlFlow_Break break> ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Name '$ATABLE'))} {(Lit_Other '=')} {(DQ (Xunion))} {(Lit_Other ']')} ) (ControlFlow token: <ControlFlow_Break break> ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Name '$ATABLE'))} {(Lit_Other '=')} {(DQ (Xfrom))} {(Lit_Other ']')} ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FROM) op: Equal rhs: {(DQ (Y))} spids: [4949] ) ] spids: [4949] ) (ControlFlow token: <ControlFlow_Continue continue> ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$FROM'))} {(Lit_Other ']')}) ] action: [ (AndOr children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Name '$ATABLE') ('@'))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [ {(echo)} {(DQ ($ VSub_Name '$ATABLE') (' does not exist.'))} ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 1 arg_word: {(2)} spids: [4997] ) ] ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (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) op: Equal rhs: {(DQ ($ VSub_Name '$ATABLE'))} spids: [5022] ) ] spids: [5022] ) ] spids: [-1 5020] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:JTABLE) op: Equal rhs: {(DQ ($ VSub_Name '$TABLE'))} spids: [5030] ) ] spids: [5030] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PREV) op: Equal rhs: {(DQ )} spids: [5036] ) ] spids: [5036] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PPREV) op: Equal rhs: {(DQ )} spids: [5041] ) ] spids: [5041] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FOUND) op: Equal rhs: {(DQ )} spids: [5046] ) ] spids: [5046] ) (ForEach iter_name: GETJ do_arg_iter: True 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) op: Equal rhs: {(DQ ($ VSub_Name '$JTABLE'))} spids: [5079] ) ] spids: [5079] ) (AndOr children: [ (C {(lookup_field)} {(DQ ($ VSub_Name '$PPREV'))} ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE) op: Equal rhs: { (DQ ($ VSub_Name '$ATABLE')) } spids: [5094] ) ] spids: [5094] ) (AndOr children: [ (C {(lookup_field)} {(DQ ($ VSub_Name '$GETJ'))} ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name: FOUND ) op: Equal rhs: {(DQ (Y1))} spids: [5111] ) ] spids: [5111] ) (ControlFlow token: <ControlFlow_Break break > ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE) op: Equal rhs: {(DQ ($ VSub_Name '$ATABLE'))} spids: [5122] ) ] spids: [5122] ) (AndOr children: [ (C {(lookup_field)} {(DQ ($ VSub_Name '$PPREV'))} ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE) op: Equal rhs: { (DQ ($ VSub_Name '$JTABLE')) } spids: [5137] ) ] spids: [5137] ) (AndOr children: [ (C {(lookup_field)} {(DQ ($ VSub_Name '$GETJ'))} ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name: FOUND ) op: Equal rhs: {(DQ (Y2))} spids: [5154] ) ] spids: [5154] ) (ControlFlow token: <ControlFlow_Break break > ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [-1 5076] ) ] spids: [-1 5165] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PPREV) op: Equal rhs: {(DQ ($ VSub_Name '$PREV'))} spids: [5168] ) ] spids: [5168] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PREV) op: Equal rhs: {(DQ ($ VSub_Name '$GETJ'))} spids: [5174] ) ] spids: [5174] ) ] spids: [5056 5180] ) spids: [-1 -1] ) (AndOr children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$FOUND'))} {(Lit_Other ']')} ) (AndOr children: [ (C {(echo)} { (DQ ('Join not found, ') (EscapedLiteralPart token: <Lit_EscapedChar '\\c'> ) ) } ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('try reordering tables.'))}] redirects: [ (Redir op_id: Redir_GreatAnd fd: 1 arg_word: {(2)} spids: [5212] ) ] ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (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_id: Redir_Great fd: -1 arg_word: {(/tmp/) ($ VSub_Dollar '$$') (join2) (Lit_Other '%') } spids: [5257] ) ] ) ] spids: [-1 5239] ) ] 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_id: Redir_Great fd: -1 arg_word: {(/tmp/) ($ VSub_Dollar '$$') (join2) (Lit_Other '%') } spids: [5282] ) ] ) ] spids: [5264 5289] ) (C {(update_view)} {(/tmp/) ($ VSub_Dollar '$$') (join2)}) (C {(mv)} {(/tmp/) ($ VSub_Dollar '$$') (join2) (Lit_Tilde '~')} {(/tmp/) ($ VSub_Dollar '$$') (join) (Lit_Tilde '~')} ) (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_id: Redir_DGreat fd: -1 arg_word: {(/tmp/) ($ VSub_Dollar '$$') (join) (Lit_Other '@')} spids: [5337] ) ] ) (Pipeline children: [ (C {(cut)} {(-d) (EscapedLiteralPart token: <Lit_EscapedChar '\\\t'> ) } {(-f1)} {(/tmp/) ($ VSub_Dollar '$$') (join) (Lit_Tilde '~')} ) (SimpleCommand words: [ {(paste)} {(/tmp/) ($ VSub_Dollar '$$') (join) (Lit_Tilde '~')} {(-)} ] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/tmp/) ($ VSub_Dollar '$$')} spids: [5369] ) ] ) ] negated: False ) (C {(mv)} {(/tmp/) ($ VSub_Dollar '$$')} {(/tmp/) ($ VSub_Dollar '$$') (join) (Lit_Tilde '~')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLE) op: Equal rhs: {(DQ (/tmp/) ($ VSub_Dollar '$$') (join))} spids: [5385] ) ] spids: [5385] ) ] spids: [5028 5393] ) ] spids: [-1 4970] ) ] spids: [-1 5396] ) ] spids: [4869 5399] ) spids: [-1 -1] ) (AndOr children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$FROM'))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ('Syntax error.'))}] redirects: [ (Redir op_id: Redir_GreatAnd fd: 1 arg_word: {(2)} spids: [5420] ) ] ) (AndOr children: [ (C {(syntax)} {(select)}) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (C {(update_view)} {(DQ ($ VSub_Name '$TABLE'))}) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DISTINCT) op: Equal rhs: {(DQ )} spids: [5447] ) ] spids: [5447] ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xdistinct))} {(Lit_Other ']')} ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DISTINCT) op: Equal rhs: {(DQ (Y))} spids: [5469] ) ] spids: [5469] ) (C {(shift)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FIELDS) op: Equal rhs: {(DQ )} spids: [5479] ) ] spids: [5479] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PRINTF) op: Equal rhs: {(DQ )} spids: [5484] ) ] spids: [5484] ) (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: False ) ] ) left_token: <Left_Backtick '`'> spids: [5538 5552] ) } {(DQ ($ VSub_At '$@'))} ) (C {(shift)}) ] spids: [-1 5529] ) ] 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) op: Equal rhs: {(DQ (Y))} spids: [5613] ) ] spids: [5613] ) (C {(shift)} {(3)}) ] spids: [-1 5611] ) ] else_action: [ (SimpleCommand words: [ {(echo)} { (DQ ('Bad field name (') ($ VSub_Number '$1') (')')) } ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 1 arg_word: {(2)} spids: [5636] ) ] ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] spids: [5624 5645] ) ] spids: [-1 5587] ) ] spids: [-1 5648] ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$FIELDS'))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FIELDS) op: Equal rhs: {(DQ ($ VSub_Name '$FIELDS') (','))} spids: [5661] ) ] spids: [5661] ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FIELDS) op: Equal rhs: { (DQ ($ VSub_Name '$FIELDS') (' ') ($ VSub_Name '$OUTFIELD')) } spids: [5668] ) ] spids: [5668] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$SUBSELECT'))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) ] action: [ (AndOr children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$PRINTF'))} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PRINTF) op: Equal rhs: {(DQ ('|'))} spids: [5706] ) ] spids: [5706] ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WIDTH) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ ($ VSub_Name '$RESULT'))} {(Lit_Other ':')} {(SQ <'[^\t]*\t\\(.*\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [5713 5727] ) } spids: [5712] ) ] spids: [5712] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PRINTF) op: Equal rhs: { (DQ ($ VSub_Name '$PRINTF') ('%-') ($ VSub_Name '$WIDTH') (.) (${ VSub_Name WIDTH) ('s|') ) } spids: [5730] ) ] spids: [5730] ) ] spids: [-1 5692] ) ] 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) 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: [5760] ) ] spids: [5760] ) ] spids: [-1 5758] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PRINTF) op: Equal rhs: { (DQ ($ VSub_Name '$PRINTF') ('%s') (EscapedLiteralPart token: <Lit_EscapedChar '\\n'> ) ) } spids: [5774] ) ] spids: [5774] ) ] spids: [5772 5782] ) ] spids: [5743 5785] ) (C {(shift)}) ] spids: [5563 5791] ) ] spids: [5508 5794] ) ) (C {(shift)} {(2)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE) op: Equal rhs: {(DQ )} spids: [5802] ) ] spids: [5802] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:SORT) op:Equal rhs:{(DQ )} spids:[5807])] spids: [5807] ) (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 children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')} ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE) op: Equal rhs: {(DQ ($ VSub_Name '$WHERE') (' || NR == 1'))} spids: [5877] ) ] spids: [5877] ) (C {(shift)}) ] spids: [-1 5847] ) (if_arm cond: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (Xorder))} {(Lit_Other ']')} ) ] action: [ (AndOr children: [ (C {(Lit_Other '[')} {(DQ (X) ($ VSub_Number '$2'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (Xby))} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [ {(echo)} {(DQ ('Syntax error (') ($ VSub_Number '$2') (')'))} ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 1 arg_word: {(2)} spids: [5935] ) ] ) (AndOr children: [ (C {(syntax)} {(select)}) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (C {(shift)} {(2)}) (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 children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_QMark '$?'))} {(-ne)} {(0)} {(Lit_Other ']')} ) (AndOr children: [ (SimpleCommand words: [ {(echo)} { (DQ ('Bad field name (') ($ VSub_Number '$1') (')') ) } ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 1 arg_word: {(2)} spids: [6072] ) ] ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$SORT'))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SORT) op: Equal rhs: { (DQ ('sort -t') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ('\t') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' ') ) } spids: [6100] ) ] spids: [6100] ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SORTL) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} { ($ VSub_Name '$OUTFIELDNUM' ) } {(-)} {(1)} ) ] ) left_token: <Left_Backtick '`'> spids: [6112 6120] ) ) } spids: [6110] ) ] spids: [6110] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SORT) op: Equal rhs: { (DQ ($ VSub_Name '$SORT') (' +') ($ VSub_Name '$SORTL') ) } spids: [6124] ) ] spids: [6124] ) (AndOr 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) op: Equal rhs: {(DQ (${ VSub_Name SORT) (n))} spids: [6151] ) ] spids: [6151] ) ] op_id: Op_DAmp ) (AndOr 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) op: Equal rhs: {(DQ (${ VSub_Name SORT) (r))} spids: [6179] ) ] spids: [6179] ) ] op_id: Op_DAmp ) (AndOr 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) op: Equal rhs: {(DQ (${ VSub_Name SORT) (r))} spids: [6207] ) ] spids: [6207] ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SORT) op: Equal rhs: { (DQ ($ VSub_Name '$SORT') (' -') ($ VSub_Name '$OUTFIELDNUM') ) } spids: [6216] ) ] spids: [6216] ) ] spids: [-1 6039] ) ] spids: [-1 6224] ) (C {(shift)}) ] spids: [5984 6230] ) ) ] spids: [5887 5905] ) (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) op: Equal rhs: {(DQ (Y))} spids: [6256] ) ] spids: [6256] ) (ControlFlow token: <ControlFlow_Break break> ) ] spids: [6233 6251] ) ] else_action: [(C {(shift)})] spids: [6265 6270] ) ] spids: [5825 6273] ) ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$INAGG'))} {(Lit_Other ']')}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WHERE) op: Equal rhs: {(DQ ('NR == 1'))} spids: [6286] ) ] spids: [6286] ) ] op_id: Op_DAmp ) (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) op: Equal rhs: { (DQ ('sort | uniq | tee /tmp/') ($ VSub_Dollar '$$') (row) ) } spids: [6331] ) ] spids: [6331] ) ] spids: [-1 6329] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DIST) op: Equal rhs: {(DQ ('uniq | tee /tmp/') ($ VSub_Dollar '$$') (row))} spids: [6341] ) ] spids: [6341] ) ] spids: [6339 6349] ) ] spids: [-1 6311] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DIST) op: Equal rhs: {(DQ (cat))} spids: [6354] ) ] spids: [6354] ) ] spids: [6352 6360] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLEFILE) op: Equal rhs: {(DQ ($ VSub_Name '$TABLE') ('~'))} spids: [6365] ) ] spids: [6365] ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$SORT'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) (AndOr children: [ (Pipeline children: [ (C {(cat)} {($ VSub_Name '$TABLE') (Lit_Tilde '~')}) (SimpleCommand words: [{(eval)} {(DQ ($ VSub_Name '$SORT'))}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/tmp/) ($ VSub_Dollar '$$')} spids: [6401] ) ] ) ] negated: False ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TABLEFILE) op: Equal rhs: {(DQ (/tmp/) ($ VSub_Dollar '$$'))} spids: [6409] ) ] spids: [6409] ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (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: False ) ] spids: [-1 6428] ) ] else_action: [ (AndOr 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: [6497 6507] ) } ) 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: True body: (DoGroup children: [ (C {(echo)} {($ VSub_Name '$NOCR1')} { (DQ ($ VSub_Name '$TAB') (-) ($ VSub_Name '$HEADING') (-) ($ VSub_Name '$NOCR2') ) } ) ] spids: [6537 6555] ) spids: [-1 -1] ) terminator: <Op_Semi ';'> ) (C {(echo)} {(DQ )}) ] ) spids: [6491 6564] ) ] spids: [-1 6487] ) ] spids: [-1 6567] ) (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: False ) (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: [-1 6641] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:X) 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: False ) ] ) left_token: <Left_Backtick '`'> spids: [6653 6671] ) } spids: [6652] ) ] spids: [6652] ) (C {(echo)} {(SQ <'('>) ($ VSub_Name '$X') (SQ <' rows)'>)}) ] spids: [6650 6686] ) ] op_id: Op_DAmp ) ] spids: [6460 6689] ) ] spids: [4841 6692] ) ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [4792] ) spids: [4789 4792] ) (While cond: [(C {(Lit_Other ':')})] body: (DoGroup children: [ (While cond: [(C {(Lit_Other ':')})] body: (DoGroup children: [ (C {(echo)} {($ VSub_Name '$NOCR1')} {(DQ ('* ') ($ VSub_Name '$NOCR2'))}) (AndOr children: [(C {(read)} {(LINE)}) (C {(exit)})] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SQLPART) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ ($ VSub_Name '$LINE'))} {(Lit_Other ':')} {(SQ <'\\(..*\\)/.$'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [6752 6764] ) ) } spids: [6750] ) ] spids: [6750] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$SQLPART'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) ] action: [ (AndOr 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) op: Equal rhs: {(DQ )} spids: [6804] ) ] spids: [6804] ) ] op_id: Op_DAmp ) (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: [6814 6826] ) ) } {(-ne)} {(0)} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_CMD) 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: [6843 6855] ) (DQ ($ VSub_Name '$NL')) } spids: [6839] ) ] spids: [6839] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LINE) op: Equal rhs: {(DQ (/p/g))} spids: [6861] ) ] spids: [6861] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NEW) op: Equal rhs: {(DQ )} spids: [6867] ) ] spids: [6867] ) ] spids: [-1 6836] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_CMD) op: Equal rhs: {(DQ ($ VSub_Name '$_CMD')) (DQ ($ VSub_Name '$SQLPART')) (DQ ($ VSub_Name '$NL')) } spids: [6875] ) ] spids: [6875] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LINE) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ ($ VSub_Name '$LINE'))} {(Lit_Other ':')} {(SQ <'.*\\(/.\\)$'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [6889 6901] ) ) } spids: [6887] ) ] spids: [6887] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NEW) op: Equal rhs: {(DQ )} spids: [6905] ) ] spids: [6905] ) ] spids: [6872 6910] ) ] spids: [-1 6785] ) ] spids: [-1 6913] ) (Case to_match: {(DQ ($ VSub_Name '$LINE'))} arms: [ (case_arm pat_list: [{(/p)} {(p)}] action: [(C {(echo)} {(DQ ($ VSub_Name '$_CMD'))})] spids: [6926 6929 6936 -1] ) (case_arm pat_list: [{(/g)} {(g)}] action: [(ControlFlow token:<ControlFlow_Break break>)] spids: [6939 6942 6945 -1] ) (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: [6948 6951 6963 -1] ) (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) op: Equal rhs: {(DQ )} spids: [6979] ) ] spids: [6979] ) ] spids: [6966 6969 6982 -1] ) (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: [6985 6988 7003 -1] ) (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_id: Redir_Great fd: -1 arg_word: {(/tmp/) ($ VSub_Dollar '$$')} spids: [7023] ) ] ) (Sentence child: (C {($ VSub_Name '$EDITOR')} {(/tmp/) ($ VSub_Dollar '$$')}) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_CMD) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(cat)} {(/tmp/) ($ VSub_Dollar '$$')})] ) left_token: <Left_Backtick '`'> spids: [7037 7042] ) ) } spids: [7035] ) ] spids: [7035] ) (C {(umask)} {(0000)}) ] spids: [7006 7009 7049 -1] ) (case_arm pat_list: [{(/i)} {(i)}] action: [ (C {(echo)} {($ VSub_Name '$NOCR1')} {(DQ ('Enter include file: ') ($ VSub_Name '$NOCR2'))} ) (C {(read)} {(LINE)}) (AndOr children: [ (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Name '$LINE'))} {(Lit_Other ']')} ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_CMD) op: Equal rhs: { (DQ ($ VSub_Name '$_CMD') (CommandSubPart command_list: (CommandList children: [(C {(cat)} {($ VSub_Name '$LINE')})] ) left_token: <Left_Backtick '`'> spids: [7089 7093] ) ($ VSub_Name '$NL') ) } spids: [7086] ) ] spids: [7086] ) (C {(echo)} {(DQ ($ VSub_Name '$LINE') (' included'))}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [7052 7055 7106 -1] ) (case_arm pat_list: [{(/w)} {(w)}] action: [ (C {(echo)} {($ VSub_Name '$NOCR1')} {(DQ ('Enter output file: ') ($ VSub_Name '$NOCR2'))} ) (C {(read)} {(LINE)}) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$LINE'))} {(Lit_Other ']')}) (AndOr children: [ (C {(umask)} {($ VSub_Name '$UMASK')}) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$_CMD'))}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ ($ VSub_Name '$LINE'))} spids: [7155] ) ] ) (AndOr children: [ (C {(umask)} {(0000)}) (C {(echo)} {(DQ ($ VSub_Name '$LINE') (' written'))}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [7109 7112 7177 -1] ) (case_arm pat_list: [{(/q)} {(q)}] action: [(C {(exit)} {(0)})] spids: [7180 7183 7188 -1] ) (case_arm pat_list: [ {(EscapedLiteralPart token:<Lit_EscapedChar '\\#'>) (Lit_Other '*')} ] action: [ (AndOr 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) op: Equal rhs: {(DQ )} spids: [7212] ) ] spids: [7212] ) ] op_id: Op_DAmp ) ] spids: [7192 7194 7216 -1] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (AndOr 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) op: Equal rhs: {(DQ )} spids: [7238] ) ] spids: [7238] ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_CMD) op: Equal rhs: { (DQ ($ VSub_Name '$_CMD') ($ VSub_Name '$LINE') ($ VSub_Name '$NL') ) } spids: [7243] ) ] spids: [7243] ) ] spids: [7219 7220 7249 -1] ) ] spids: [6916 6922 7252] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:NEW) op:Equal rhs:{(DQ )} spids:[7255])] spids: [7255] ) ] spids: [6727 7260] ) ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:CMD) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$_CMD'))}) (C {(sed)} {(-e)} { (DQ (s/) (EscapedLiteralPart token:<Lit_EscapedChar "\\'">) (/) (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: False ) ] ) left_token: <Left_Backtick '`'> spids: [7265 7343] ) } spids: [7264] ) ] spids: [7264] ) (AndOr children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$CMD'))} {(Lit_Other ']')}) (ControlFlow token:<ControlFlow_Continue continue>) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:IFS) op: Equal rhs: {(DQ ($ VSub_Name '$_IFS') (','))} spids: [7361] ) ] spids: [7361] ) (C {(eval)} {(set)} {(X)} {($ VSub_Name '$CMD')}) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:IFS) op: Equal rhs: {(DQ ($ VSub_Name '$_IFS'))} spids: [7380] ) ] spids: [7380] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:NEW) op:Equal rhs:{(DQ (Y))} spids:[7386])] spids: [7386] ) (Case to_match: {($ VSub_Number '$1')} arms: [ (case_arm pat_list: [{(select)}] action: [(C {(select_)} {(DQ ($ VSub_At '$@'))})] spids: [7399 7400 7407 -1] ) (case_arm pat_list: [{(create)}] action: [(C {(create)} {(DQ ($ VSub_At '$@'))})] spids: [7411 7412 7419 -1] ) (case_arm pat_list: [{(delete)}] action: [(C {(delete)} {(DQ ($ VSub_At '$@'))})] spids: [7422 7423 7430 -1] ) (case_arm pat_list: [{(drop)}] action: [(C {(drop)} {(DQ ($ VSub_At '$@'))})] spids: [7433 7434 7441 -1] ) (case_arm pat_list: [{(insert)}] action: [(C {(insert)} {(DQ ($ VSub_At '$@'))})] spids: [7444 7445 7452 -1] ) (case_arm pat_list: [{(update)}] action: [(C {(update)} {(DQ ($ VSub_At '$@'))})] spids: [7455 7456 7463 -1] ) (case_arm pat_list: [{(edit)}] action: [ (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other ']')}) (C {($ VSub_Name '$EDITOR')} {($ VSub_Number '$2') (Lit_Other '@')}) ] op_id: Op_DAmp ) ] spids: [7466 7467 7483 -1] ) (case_arm pat_list: [{(help)}] action: [(C {(help)} {(DQ ($ VSub_At '$@'))})] spids: [7486 7487 7494 -1] ) (case_arm pat_list: [{(print)}] action: [ (C {(select_)} {(DQ (select))} {(SQ <'*'>)} {(DQ (from))} {(DQ ($ VSub_Number '$2'))}) ] spids: [7497 7498 7517 -1] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (SimpleCommand words: [{(echo)} {(DQ ('Missing or unrecognized command.'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[7529])] ) ] spids: [7520 7521 7532 -1] ) ] spids: [7392 7396 7535] ) ] spids: [6719 7537] ) ) ] )