(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RFC5424_FMT) op: Equal rhs: {(SQ <'^<[0-9][0-9]*>1 [0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}'>)} spids: [17] ) ] spids: [17] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RFC3164_FMT) op: Equal rhs: {(SQ <'^[A-Z][a-z]{2} [ 0-9][0-9] [0-9]{2}:[0-9]{2}:[0-9]{2}'>)} spids: [29] ) ] spids: [29] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:COUNT) op:Equal rhs:{(0)} spids:[35])] spids: [35] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TMPDIR) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> spids: [39 41] ) (/work) } spids: [38] ) ] spids: [38] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_QMark '$?')} {(-ne)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ($ VSub_Number '$0') (": Can't create temp dir, exiting..."))}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 57] ) ] spids: [16777215 72] ) (FuncDef name: begin body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COUNT) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(expr)} {($ VSub_Name '$COUNT')} {(Lit_Other '+')} {(1)})] ) left_token: <Left_Backtick '`'> spids: [86 94] ) } spids: [85] ) ] spids: [85] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:OK) op:Equal rhs:{(1)} spids:[97])] spids: [97] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NAME) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [101] ) ] spids: [101] ) ] spids: [82] ) spids: [78 81] ) (FuncDef name: end body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {($ VSub_Name '$OK')} {(Lit_Other '=')} {(1)} {(Lit_Other ']')}) ] action: [(C {(printf)} {(SQ <'ok '>)})] spids: [16777215 132] ) ] else_action: [(C {(printf)} {(SQ <'not ok '>)})] spids: [142 152] ) (C {(echo)} {(DQ ($ VSub_Name '$COUNT') (' - ') ($ VSub_Name '$NAME'))}) ] spids: [116] ) spids: [112 115] ) (FuncDef name: mkf body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:CN) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(basename)} {($ VSub_Number '$1')})] ) left_token: <Left_Backtick '`'> spids: [177 181] ) } spids: [176] ) ] spids: [176] ) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$CN') (-) ($ VSub_Name '$CN'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Number '$1')} spids: [192] ) ] ) ] spids: [173] ) spids: [169 172] ) (FuncDef name: ckf body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(-f)} {($ VSub_Number '$2')} {(Lit_Other ']')}) (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Number '$1') (-) ($ VSub_Number '$1'))}) (SimpleCommand words: [{(diff)} {(-)} {($ VSub_Number '$2')}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [236] ) ] ) ] negated: F ) ] ) ] action: [(C {(ok)})] spids: [16777215 240] ) ] else_action: [(C {(notok)})] spids: [246 252] ) ] spids: [205] ) spids: [201 204] ) (FuncDef name: ckfe body: (BraceGroup children: [ (If arms: [ (if_arm cond: [(C {(Lit_Other '[')} {(-f)} {($ VSub_Number '$1')} {(Lit_Other ']')})] action: [(C {(ok)})] spids: [16777215 278] ) ] else_action: [(C {(notok)})] spids: [284 290] ) ] spids: [264] ) spids: [260 263] ) (FuncDef name: cknt body: (BraceGroup children: [ (If arms: [ (if_arm cond: [(C {(Lit_Other '[')} {(-r)} {($ VSub_Number '$1')} {(Lit_Other ']')})] action: [(C {(notok)})] spids: [16777215 319] ) ] else_action: [(C {(ok)})] spids: [325 331] ) ] spids: [305] ) spids: [301 304] ) (FuncDef name: ckntfe body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:curcnt) op: Equal rhs: {($ VSub_Number '$1')} spids: [352] ) ] spids: [352] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:keepcnt) op: Equal rhs: {($ VSub_Number '$2')} spids: [356] ) ] spids: [356] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:f) op: Equal rhs: {($ VSub_Number '$3')} spids: [360] ) ] spids: [360] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {($ VSub_Name '$curcnt')} {(-le)} {($ VSub_Name '$keepcnt')} {(Lit_Other ']')} ) ] action: [(C {(ckfe)} {($ VSub_Name '$f')})] spids: [16777215 378] ) ] else_action: [(C {(cknt)} {($ VSub_Name '$f')})] spids: [390 402] ) ] spids: [349] ) spids: [345 348] ) (FuncDef name: ckrfc5424 body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:lc) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(wc)} {(-l)} {($ VSub_Number '$1')}) (C {(cut)} {(-w)} {(-f2)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [420 434] ) } spids: [419] ) ] spids: [417] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:rc) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(grep)} {(-cE)} {(DQ (${ VSub_Name RFC5424_FMT))} {($ VSub_Number '$1')} ) ] ) left_token: <Left_CommandSub '$('> spids: [440 452] ) } spids: [439] ) ] spids: [437] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$lc'))} {(-eq)} {(0)} {(-o)} {(DQ ($ VSub_Name '$rc'))} {(-eq)} {(0)} {(-o)} {(DQ ($ VSub_Name '$lc'))} {(-ne)} {(DQ ($ VSub_Name '$rc'))} {(Lit_Other ']')} ) ] action: [(C {(notok)})] spids: [16777215 492] ) ] else_action: [(C {(ok)})] spids: [498 504] ) ] spids: [414] ) spids: [410 413] ) (FuncDef name: ckrfc3164 body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:lc) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(wc)} {(-l)} {($ VSub_Number '$1')}) (C {(cut)} {(-w)} {(-f2)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [523 537] ) } spids: [522] ) ] spids: [520] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:rc) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(grep)} {(-cE)} {(DQ (${ VSub_Name RFC3164_FMT))} {($ VSub_Number '$1')} ) ] ) left_token: <Left_CommandSub '$('> spids: [543 555] ) } spids: [542] ) ] spids: [540] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$lc'))} {(-eq)} {(0)} {(-o)} {(DQ ($ VSub_Name '$rc'))} {(-eq)} {(0)} {(-o)} {(DQ ($ VSub_Name '$lc'))} {(-ne)} {(DQ ($ VSub_Name '$rc'))} {(Lit_Other ']')} ) ] action: [(C {(notok)})] spids: [16777215 595] ) ] else_action: [(C {(ok)})] spids: [601 607] ) ] spids: [517] ) spids: [513 516] ) (FuncDef name: ok body: (BraceGroup children:[(C {(Lit_Other ':')})] spids:[620]) spids: [616 619] ) (FuncDef name: notok body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:OK) op:Equal rhs:{(0)} spids:[638])] spids: [638] ) ] spids: [635] ) spids: [631 634] ) (FuncDef name: ckfail body: (BraceGroup children: [ (If arms: [ (if_arm cond: [(C {(Lit_Other '[')} {($ VSub_Number '$1')} {(-gt)} {(0)} {(Lit_Other ']')})] action: [(C {(ok)})] spids: [16777215 667] ) ] else_action: [(C {(notok)})] spids: [673 679] ) ] spids: [651] ) spids: [647 650] ) (FuncDef name: ckok body: (BraceGroup children: [ (If arms: [ (if_arm cond: [(C {(Lit_Other '[')} {($ VSub_Number '$1')} {(-eq)} {(0)} {(Lit_Other ']')})] action: [(C {(ok)})] spids: [16777215 707] ) ] else_action: [(C {(notok)})] spids: [713 719] ) ] spids: [691] ) spids: [687 690] ) (FuncDef name: chkfcnt body: (BraceGroup children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cnt) op: Equal rhs: {($ VSub_Number '$1')} spids: [734] ) ] spids: [734] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {($ VSub_Name '$cnt')} {(-eq)} { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(echo)} {(DQ ($ VSub_At '$@'))}) (C {(wc)} {(-w)})] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [749 761] ) } {(Lit_Other ']')} ) ] action: [(C {(ok)})] spids: [16777215 766] ) ] else_action: [(C {(notok)})] spids: [772 778] ) ] spids: [731] ) spids: [727 730] ) (FuncDef name: ckstr body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other ']')} ) ] action: [(C {(ok)})] spids: [16777215 810] ) ] else_action: [(C {(notok)})] spids: [816 822] ) ] spids: [790] ) spids: [786 789] ) (FuncDef name: tmpdir_create body: (BraceGroup children: [ (C {(mkdir)} {(-p)} {(${ VSub_Name TMPDIR) (/log)} {(${ VSub_Name TMPDIR) (/alog)}) (C {(cd)} {(${ VSub_Name TMPDIR) (/log)}) ] spids: [831] ) spids: [827 830] ) (FuncDef name: tmpdir_clean body: (BraceGroup children: [ (C {(cd)} {(${ VSub_Name TMPDIR)}) (C {(rm)} {(-rf)} {(DQ (${ VSub_Name TMPDIR) (/log))} {(DQ (${ VSub_Name TMPDIR) (/alog))} {(newsyslog.conf)} ) ] spids: [863] ) spids: [859 862] ) (FuncDef name: run_newsyslog body: (BraceGroup children: [ (C {(newsyslog)} {(-f)} {(../newsyslog.conf)} {(-F)} {(-r)} {(DQ ($ VSub_At '$@'))}) ] spids: [900] ) spids: [896 899] ) (FuncDef name: tests_normal_rotate body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ext) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [928] ) ] spids: [928] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:dir) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [934] ) ] spids: [934] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Name '$dir'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:newsyslog_args) op: Equal rhs: {(DQ (' -a ') (${ VSub_Name dir))} spids: [957] ) ] spids: [957] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:name_postfix) op: Equal rhs: {(DQ (${ VSub_Name ext) (' archive dir'))} spids: [966] ) ] spids: [966] ) ] spids: [16777215 954] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:newsyslog_args) op: Equal rhs: {(DQ )} spids: [978] ) ] spids: [978] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:name_postfix) op: Equal rhs: {(DQ (${ VSub_Name ext))} spids: [983] ) ] spids: [983] ) ] spids: [975 991] ) (C {(tmpdir_create)}) (C {(begin)} {(DQ ('create file ') (${ VSub_Name name_postfix))} {(-newdir)}) (C {(run_newsyslog)} {(-C)}) (C {(ckfe)} {($ VSub_Name '$LOGFNAME')}) (C {(cknt)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.0) (${ VSub_Name ext)}) (C {(end)}) (C {(begin)} {(DQ ('rotate normal 1 ') (${ VSub_Name name_postfix))}) (C {(run_newsyslog)} {($ VSub_Name '$newsyslog_args')}) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(ckfe)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.0) (${ VSub_Name ext)}) (C {(cknt)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.1) (${ VSub_Name ext)}) (C {(end)}) (C {(begin)} {(DQ ('rotate normal 2 ') (${ VSub_Name name_postfix))}) (C {(run_newsyslog)} {($ VSub_Name '$newsyslog_args')}) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(ckfe)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.0) (${ VSub_Name ext)}) (C {(ckfe)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.1) (${ VSub_Name ext)}) (C {(cknt)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.2) (${ VSub_Name ext)}) (C {(end)}) (C {(begin)} {(DQ ('rotate normal 3 ') (${ VSub_Name name_postfix))}) (C {(run_newsyslog)} {($ VSub_Name '$newsyslog_args')}) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(ckfe)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.0) (${ VSub_Name ext)}) (C {(ckfe)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.1) (${ VSub_Name ext)}) (C {(ckfe)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.2) (${ VSub_Name ext)}) (C {(cknt)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.3) (${ VSub_Name ext)}) (C {(end)}) (C {(begin)} {(DQ ('rotate normal 4 ') (${ VSub_Name name_postfix))}) (C {(run_newsyslog)} {($ VSub_Name '$newsyslog_args')}) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(ckfe)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.0) (${ VSub_Name ext)}) (C {(ckfe)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.1) (${ VSub_Name ext)}) (C {(ckfe)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.2) (${ VSub_Name ext)}) (C {(cknt)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.4) (${ VSub_Name ext)}) (C {(end)}) (C {(begin)} {(DQ ('rotate normal 5 ') (${ VSub_Name name_postfix))}) (C {(run_newsyslog)} {($ VSub_Name '$newsyslog_args')}) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(ckfe)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.0) (${ VSub_Name ext)}) (C {(ckfe)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.1) (${ VSub_Name ext)}) (C {(ckfe)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.2) (${ VSub_Name ext)}) (C {(cknt)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.4) (${ VSub_Name ext)}) (C {(end)}) (C {(sleep)} {(1.1)}) (C {(begin)} {(DQ ('noaction ') (${ VSub_Name name_postfix))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ofiles) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(ls)} {(-Tl)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.) (Lit_Other '*') (${ VSub_Name ext) } ) (C {(tr)} {(-d)} {(SQ <'\\n'>)}) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [1428 1454] ) } spids: [1427] ) ] spids: [1427] ) (SimpleCommand words: [{(run_newsyslog)} {(${ VSub_Name newsyslog_args)} {(-n)}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[1465])] ) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(ckstr)} {(DQ ($ VSub_Name '$ofiles'))} { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(ls)} {(-lT)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.) (Lit_Other '*') (${ VSub_Name ext) } ) (C {(tr)} {(-d)} {(SQ <'\\n'>)}) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [1483 1509] ) ) } ) (C {(end)}) (C {(tmpdir_clean)}) ] spids: [925] ) spids: [921 924] ) (FuncDef name: tests_normal_rotate_keepn body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cnt) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [1529] ) ] spids: [1529] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ext) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [1535] ) ] spids: [1535] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:dir) op: Equal rhs: {(DQ ($ VSub_Number '$3'))} spids: [1541] ) ] spids: [1541] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Name '$dir'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:newsyslog_args) op: Equal rhs: {(DQ (' -a ') (${ VSub_Name dir))} spids: [1564] ) ] spids: [1564] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:name_postfix) op: Equal rhs: {(DQ (${ VSub_Name ext) (' archive dir'))} spids: [1573] ) ] spids: [1573] ) ] spids: [16777215 1561] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:newsyslog_args) op: Equal rhs: {(DQ )} spids: [1585] ) ] spids: [1585] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:name_postfix) op: Equal rhs: {(DQ (${ VSub_Name ext))} spids: [1590] ) ] spids: [1590] ) ] spids: [1582 1598] ) (C {(tmpdir_create)}) (C {(begin)} {(DQ ('create file ') (${ VSub_Name name_postfix))} {(-newdir)}) (C {(run_newsyslog)} {(-C)}) (C {(ckfe)} {($ VSub_Name '$LOGFNAME')}) (C {(cknt)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.0) (${ VSub_Name ext)}) (C {(end)}) (C {(begin)} {(DQ ('rotate normal 1 cnt=') ($ VSub_Name '$cnt') (' ') (${ VSub_Name name_postfix))} ) (C {(run_newsyslog)} {($ VSub_Name '$newsyslog_args')}) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(ckntfe)} {(1)} {($ VSub_Name '$cnt')} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.0) (${ VSub_Name ext)} ) (C {(cknt)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.1) (${ VSub_Name ext)}) (C {(end)}) (C {(begin)} {(DQ ('rotate normal 2 cnt=') ($ VSub_Name '$cnt') (' ') (${ VSub_Name name_postfix))} ) (C {(run_newsyslog)} {($ VSub_Name '$newsyslog_args')}) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(ckntfe)} {(1)} {($ VSub_Name '$cnt')} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.0) (${ VSub_Name ext)} ) (C {(ckntfe)} {(2)} {($ VSub_Name '$cnt')} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.1) (${ VSub_Name ext)} ) (C {(cknt)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.2) (${ VSub_Name ext)}) (C {(end)}) (C {(begin)} {(DQ ('rotate normal 3 cnt=') ($ VSub_Name '$cnt') (' ') (${ VSub_Name name_postfix))} ) (C {(run_newsyslog)} {($ VSub_Name '$newsyslog_args')}) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(ckntfe)} {(1)} {($ VSub_Name '$cnt')} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.0) (${ VSub_Name ext)} ) (C {(ckntfe)} {(2)} {($ VSub_Name '$cnt')} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.1) (${ VSub_Name ext)} ) (C {(ckntfe)} {(3)} {($ VSub_Name '$cnt')} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.2) (${ VSub_Name ext)} ) (C {(cknt)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.3) (${ VSub_Name ext)}) (C {(end)}) (C {(begin)} {(DQ ('rotate normal 3 cnt=') ($ VSub_Name '$cnt') (' ') (${ VSub_Name name_postfix))} ) (C {(run_newsyslog)} {($ VSub_Name '$newsyslog_args')}) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(ckntfe)} {(1)} {($ VSub_Name '$cnt')} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.0) (${ VSub_Name ext)} ) (C {(ckntfe)} {(2)} {($ VSub_Name '$cnt')} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.1) (${ VSub_Name ext)} ) (C {(ckntfe)} {(3)} {($ VSub_Name '$cnt')} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.2) (${ VSub_Name ext)} ) (C {(ckntfe)} {(4)} {($ VSub_Name '$cnt')} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.3) (${ VSub_Name ext)} ) (C {(cknt)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.4) (${ VSub_Name ext)}) (C {(end)}) (C {(sleep)} {(1.1)}) (C {(begin)} {(DQ ('noaction ') (${ VSub_Name name_postfix))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:osum) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(md5)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME)}) (C {(tr)} {(-d)} {(SQ <'\\n'>)}) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [2015 2034] ) } spids: [2014] ) ] spids: [2014] ) (SimpleCommand words: [{(run_newsyslog)} {(${ VSub_Name newsyslog_args)} {(-n)}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[2045])] ) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(ckstr)} {(DQ ($ VSub_Name '$osum'))} { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(md5)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME)}) (C {(tr)} {(-d)} {(SQ <'\\n'>)}) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [2063 2082] ) ) } ) (C {(end)}) (C {(tmpdir_clean)}) ] spids: [1526] ) spids: [1522 1525] ) (FuncDef name: tests_time_rotate body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ext) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [2102] ) ] spids: [2102] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:dir) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [2108] ) ] spids: [2108] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Name '$dir'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:newsyslog_args) op: Equal rhs: {(DQ ('-t DEFAULT -a ') (${ VSub_Name dir))} spids: [2131] ) ] spids: [2131] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:name_postfix) op: Equal rhs: {(DQ (${ VSub_Name ext) (' archive dir'))} spids: [2140] ) ] spids: [2140] ) ] spids: [16777215 2128] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:newsyslog_args) op: Equal rhs: {(DQ ('-t DEFAULT'))} spids: [2152] ) ] spids: [2152] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:name_postfix) op: Equal rhs: {(DQ (${ VSub_Name ext))} spids: [2158] ) ] spids: [2158] ) ] spids: [2149 2166] ) (C {(tmpdir_create)}) (C {(begin)} {(DQ ('create file ') (${ VSub_Name name_postfix))} {(-newdir)}) (C {(run_newsyslog)} {(-C)} {(${ VSub_Name newsyslog_args)}) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(end)}) (C {(begin)} {(DQ ('rotate time 1 ') (${ VSub_Name name_postfix))}) (C {(run_newsyslog)} {(${ VSub_Name newsyslog_args)}) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(chkfcnt)} {(1)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.) (Lit_Other '*') (${ VSub_Name ext)} ) (C {(end)}) (C {(sleep)} {(1.1)}) (C {(begin)} {(DQ ('rotate time 2 ') (${ VSub_Name name_postfix))}) (C {(run_newsyslog)} {(${ VSub_Name newsyslog_args)}) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(chkfcnt)} {(2)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.) (Lit_Other '*') (${ VSub_Name ext)} ) (C {(end)}) (C {(sleep)} {(1.1)}) (C {(begin)} {(DQ ('rotate time 3 ') (${ VSub_Name name_postfix))}) (C {(run_newsyslog)} {(${ VSub_Name newsyslog_args)}) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(chkfcnt)} {(3)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.) (Lit_Other '*') (${ VSub_Name ext)} ) (C {(end)}) (C {(sleep)} {(1.1)}) (C {(begin)} {(DQ ('rotate time 4 ') (${ VSub_Name name_postfix))}) (C {(run_newsyslog)} {(${ VSub_Name newsyslog_args)}) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(chkfcnt)} {(3)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.) (Lit_Other '*') (${ VSub_Name ext)} ) (C {(end)}) (C {(begin)} {(DQ ('noaction ') (${ VSub_Name name_postfix))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ofiles) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(ls)} {(-1)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.) (Lit_Other '*') (${ VSub_Name ext) } ) (C {(tr)} {(-d)} {(SQ <'\\n'>)}) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [2415 2441] ) } spids: [2414] ) ] spids: [2414] ) (SimpleCommand words: [{(run_newsyslog)} {(${ VSub_Name newsyslog_args)} {(-n)}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[2452])] ) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(ckstr)} {(DQ ($ VSub_Name '$ofiles'))} { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(ls)} {(-1)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.) (Lit_Other '*') (${ VSub_Name ext) } ) (C {(tr)} {(-d)} {(SQ <'\\n'>)}) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [2470 2496] ) ) } ) (C {(end)}) (C {(tmpdir_clean)}) ] spids: [2099] ) spids: [2095 2098] ) (FuncDef name: tests_rfc5424 body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ext) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [2516] ) ] spids: [2516] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:dir) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [2522] ) ] spids: [2522] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Name '$dir'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:newsyslog_args) op: Equal rhs: {(DQ (' -a ') (${ VSub_Name dir))} spids: [2545] ) ] spids: [2545] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:name_postfix) op: Equal rhs: {(DQ (${ VSub_Name ext) (' archive dir'))} spids: [2554] ) ] spids: [2554] ) ] spids: [16777215 2542] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:newsyslog_args) op: Equal rhs: {(DQ )} spids: [2566] ) ] spids: [2566] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:name_postfix) op: Equal rhs: {(DQ (${ VSub_Name ext))} spids: [2571] ) ] spids: [2571] ) ] spids: [2563 2579] ) (C {(tmpdir_create)}) (C {(begin)} {(DQ ('RFC-5424 - create file ') (${ VSub_Name name_postfix))} {(-newdir)}) (C {(run_newsyslog)} {(-C)}) (C {(ckfe)} {($ VSub_Name '$LOGFNAME')}) (C {(cknt)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.0) (${ VSub_Name ext)}) (C {(ckfe)} {($ VSub_Name '$LOGFNAME5424')}) (C {(cknt)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME5424) (.0) (${ VSub_Name ext)}) (C {(ckrfc3164)} {(${ VSub_Name LOGFNAME)}) (C {(ckrfc5424)} {(${ VSub_Name LOGFNAME5424)}) (C {(end)}) (C {(begin)} {(DQ ('RFC-5424 - rotate normal 1 ') (${ VSub_Name name_postfix))}) (C {(run_newsyslog)} {($ VSub_Name '$newsyslog_args')}) (C {(ckfe)} {(${ VSub_Name LOGFNAME)}) (C {(ckfe)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.0) (${ VSub_Name ext)}) (C {(ckfe)} {($ VSub_Name '$LOGFNAME5424')}) (C {(ckfe)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME5424) (.0) (${ VSub_Name ext)}) (C {(ckrfc3164)} {(${ VSub_Name LOGFNAME)}) (C {(ckrfc3164)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME) (.0) (${ VSub_Name ext)}) (C {(ckrfc5424)} {(${ VSub_Name LOGFNAME5424)}) (C {(ckrfc5424)} {(${ VSub_Name dir) (${ VSub_Name LOGFNAME5424) (.0) (${ VSub_Name ext)}) (C {(end)}) (C {(tmpdir_clean)}) ] spids: [2513] ) spids: [2509 2512] ) (C {(echo)} {(1..128)}) (C {(mkdir)} {(-p)} {(${ VSub_Name TMPDIR)}) (C {(cd)} {(${ VSub_Name TMPDIR)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:LOGFNAME) op:Equal rhs:{(foo.log)} spids:[2785])] spids: [2785] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LOGFPATH) op: Equal rhs: {(${ VSub_Name TMPDIR) (/log/) (${ VSub_Name LOGFNAME)} spids: [2788] ) ] spids: [2788] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:LOGFNAME5424) op:Equal rhs:{(foo5424.log)} spids:[2801])] spids: [2801] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LOGFPATH5424) op: Equal rhs: {(${ VSub_Name TMPDIR) (/log/) (${ VSub_Name LOGFNAME5424)} spids: [2804] ) ] spids: [2804] ) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 0\t *\t@T00 NC'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[2824])] ) (C {(tests_normal_rotate_keepn)} {(0)}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 1\t *\t@T00 NC'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[2840])] ) (C {(tests_normal_rotate_keepn)} {(1)}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 2\t *\t@T00 NC'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[2856])] ) (C {(tests_normal_rotate_keepn)} {(2)}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 3\t *\t@T00 NC'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[2872])] ) (C {(tests_normal_rotate_keepn)} {(3)}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 0\t *\t@T00 NCZ'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[2891])] ) (C {(tests_normal_rotate_keepn)} {(0)} {(DQ (.gz))}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 1\t *\t@T00 NCZ'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[2911])] ) (C {(tests_normal_rotate_keepn)} {(1)} {(DQ (.gz))}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 2\t *\t@T00 NCZ'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[2931])] ) (C {(tests_normal_rotate_keepn)} {(2)} {(DQ (.gz))}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 3\t *\t@T00 NCZ'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[2951])] ) (C {(tests_normal_rotate_keepn)} {(3)} {(DQ (.gz))}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 3\t *\t@T00 NC'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[2974])] ) (C {(tests_normal_rotate)}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 3\t *\t@T00 NCZ'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[2988])] ) (C {(tests_normal_rotate)} {(DQ (.gz))}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 3\t *\t@T00 NCJ'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[3006])] ) (C {(tests_normal_rotate)} {(DQ (.bz2))}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 3\t *\t@T00 NC'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[3027])] ) (C {(tests_normal_rotate)} {(DQ )} {(DQ (${ VSub_Name TMPDIR) (/alog/))}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 3\t *\t@T00 NCZ'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[3051])] ) (C {(tests_normal_rotate)} {(DQ (.gz))} {(DQ (${ VSub_Name TMPDIR) (/alog/))}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 3\t *\t@T00 NCJ'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[3076])] ) (C {(tests_normal_rotate)} {(DQ (.bz2))} {(DQ (${ VSub_Name TMPDIR) (/alog/))}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 3\t *\t@T00 NC'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[3104])] ) (C {(tests_time_rotate)}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 3\t *\t@T00 NCZ'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[3118])] ) (C {(tests_time_rotate)} {(DQ (gz))} {(DQ )}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 3\t *\t@T00 NCJ'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[3139])] ) (C {(tests_time_rotate)} {(DQ (bz2))} {(DQ )}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 3\t *\t@T00 NC'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[3163])] ) (C {(tests_time_rotate)} {(DQ )} {(DQ (${ VSub_Name TMPDIR) (/alog/))}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 3\t *\t@T00 NCZ'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[3187])] ) (C {(tests_time_rotate)} {(DQ (gz))} {(DQ (${ VSub_Name TMPDIR) (/alog/))}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 3\t *\t@T00 NCJ'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[3212])] ) (C {(tests_time_rotate)} {(DQ (bz2))} {(DQ (${ VSub_Name TMPDIR) (/alog/))}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH5424') ('\t640 3\t *\t@T00 NCT'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(newsyslog.conf)} spids:[3240])] ) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$LOGFPATH') ('\t640 3\t *\t@T00 NC'))}] redirects: [(Redir op_id:Redir_DGreat fd:16777215 arg_word:{(newsyslog.conf)} spids:[3251])] ) (C {(tests_rfc5424)}) (C {(rm)} {(-rf)} {(DQ (${ VSub_Name TMPDIR))}) ] )