(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:agendafile) op: Equal rhs: {(DQ ($ VSub_Name '$HOME') (/.agenda))} spids: [11] ) ] spids: [11] ) (FuncDef name: checkDate body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:weekday) op: Equal rhs: {($ VSub_Number '$1')} spids: [29] ) (assign_pair lhs: (LhsName name:day) op: Equal rhs: {($ VSub_Number '$2')} spids: [32] ) (assign_pair lhs: (LhsName name:month) op: Equal rhs: {($ VSub_Number '$3')} spids: [35] ) (assign_pair lhs: (LhsName name:year) op: Equal rhs: {($ VSub_Number '$4')} spids: [38] ) ] spids: [29] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:format1) op: Equal rhs: {(DQ ($ VSub_Name '$weekday'))} spids: [42] ) (assign_pair lhs: (LhsName name:format2) op: Equal rhs: {(DQ ($ VSub_Name '$day') ($ VSub_Name '$month'))} spids: [47] ) (assign_pair lhs: (LhsName name:format3) op: Equal rhs: {(DQ ($ VSub_Name '$day') ($ VSub_Name '$month') ($ VSub_Name '$year'))} spids: [53] ) ] spids: [42] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:IFS) op:Equal rhs:{(DQ ('|'))} spids:[67])] spids: [67] ) (C {(echo)} {(DQ ('On the agenda for today:'))}) (While cond: [(Sentence child:(C {(read)} {(date)} {(description)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$date'))} {(Lit_Other '=')} {(DQ ($ VSub_Name '$format1'))} {(-o)} {(DQ ($ VSub_Name '$date'))} {(Lit_Other '=')} {(DQ ($ VSub_Name '$format2'))} {(-o)} {(DQ ($ VSub_Name '$date'))} {(Lit_Other '=')} {(DQ ($ VSub_Name '$format3'))} {(Lit_Other ']')} ) ] action: [(C {(echo)} {(DQ (' ') ($ VSub_Name '$description'))})] spids: [16777215 141] ) ] spids: [16777215 152] ) ] spids: [95 155] ) redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {($ VSub_Name '$agendafile')} spids: [157] ) ] ) ] spids: [22] ) spids: [18 21] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-e)} {($ VSub_Name '$agendafile')} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} {(DQ ($ VSub_Number '$0') (": You don't seem to have an .agenda file. "))} ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[188])] ) (SimpleCommand words: [{(echo)} {(DQ ("To remedy this, please use 'addagenda' to add events"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[198])] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 178] ) ] spids: [16777215 206] ) (C {(eval)} { (CommandSubPart command_list: (CommandList children: [(C {(date)} {(SQ <'+weekday="%a" month="%b" day="%e" year="%G"'>)})] ) left_token: <Left_CommandSub '$('> spids: [215 221] ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:day) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(echo)} {($ VSub_Name '$day')}) (C {(sed)} {(SQ <'s/ //g'>)})] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [226 236] ) ) } spids: [224] ) ] spids: [224] ) (C {(checkDate)} {($ VSub_Name '$weekday')} {($ VSub_Name '$day')} {($ VSub_Name '$month')} {($ VSub_Name '$year')} ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] )