(CommandList children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-eq)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:thedate) op:Equal rhs:{(DQ (today))} spids:[33])] spids: [33] ) ] spids: [16777215 30] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:mon) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(echo)} {($ VSub_Number '$1')}) (C {(cut)} {(-d/)} {(-f1)})] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [47 59] ) ) } spids: [45] ) ] spids: [45] ) (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_Number '$1')}) (C {(cut)} {(-d/)} {(-f2)})] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [65 77] ) ) } spids: [63] ) ] spids: [63] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:year) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(echo)} {($ VSub_Number '$1')}) (C {(cut)} {(-d/)} {(-f3)})] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [83 95] ) ) } spids: [81] ) ] spids: [81] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$year'))} {(-o)} {(-z)} {(DQ ($ VSub_Name '$day'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ('Error: only valid date format is MM/DD/YYYY'))}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 122] ) ] spids: [16777215 140] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:thedate) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [154] ) ] spids: [154] ) ] spids: [38 162] ) (C {(echo)} {(checking)} {(moon)} {(phase)} {(KW_For for)} {(day)} {(Lit_Other '=')} {($ VSub_Name '$thedate')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ('http://www.moongiant.com/phase/') ($ VSub_Name '$thedate'))} spids: [182] ) ] spids: [182] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pattern) op: Equal rhs: {(DQ ('Illumination:'))} spids: [188] ) ] spids: [188] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:phase) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(curl)} {(-s)} {(DQ ($ VSub_Name '$url'))}) (C {(grep)} {(DQ ($ VSub_Name '$pattern'))}) (C {(tr)} {(SQ <','>)} {(SQ <'\\\n'>)}) (C {(grep)} {(DQ ($ VSub_Name '$pattern'))}) (C {(sed)} {(SQ <'s/[^0-9]//g'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [196 241] ) ) } spids: [194] ) ] spids: [194] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$thedate'))} {(Lit_Other '=')} {(DQ (today))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(DQ ('Today the moon is ') (${ VSub_Name phase) ('% illuminated.'))})] spids: [16777215 267] ) ] else_action: [ (C {(echo)} { (DQ ('On ') ($ VSub_Name '$thedate') (' the moon = ') (${ VSub_Name phase) ('% illuminated.')) } ) ] spids: [280 295] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] )