(command.CommandList children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-ne>} {<3>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} { (DQ <'Usage: '> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<basename>} {($ Id.VSub_Number '$0')}) ) <' mon day year'> ) } ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Simple words: [{<echo>} {(DQ <' with just numerical values (ex: 7 7 1776)'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [7 21] ) ] ) (command.Simple words: [{<date>} {<--version>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>}) (redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>}) ] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:baddate) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_QMark '$?'))} spids: [71] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {($ Id.VSub_DollarName '$baddate')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<date>} {<-d>} {($ Id.VSub_Number '$1') <'/'> ($ Id.VSub_Number '$2') <'/'> ($ Id.VSub_Number '$3')} {<Id.Lit_Other '+'> (DQ <'That was a %A.'>)} ) ] spids: [80 92] ) ] else_action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Number '$2')} {<-lt>} {<10>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pattern) op: assign_op.Equal rhs: {(DQ <' '> ($ Id.VSub_Number '$2') <'[^0-9]'>)} spids: [131] ) ] ) ] spids: [114 128] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pattern) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$2') <'[^0-9]'>)} spids: [142] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dayofweek) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<ncal>} {($ Id.VSub_Number '$1')} {($ Id.VSub_Number '$3')}) (C {<grep>} {(DQ ($ Id.VSub_DollarName '$pattern'))}) (C {<cut>} {<-c1-2>}) ] negated: F ) ) ) } spids: [153] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$dayofweek')} arms: [ (case_arm pat_list: [{<Su>}] action: [ (command.Sentence child: (C {<echo>} {(DQ <'That was a Sunday'>)}) terminator: <Id.Op_Semi _> ) ] spids: [188 190 199 -1] ) (case_arm pat_list: [{<Mo>}] action: [ (command.Sentence child: (C {<echo>} {(DQ <'That was a Monday'>)}) terminator: <Id.Op_Semi _> ) ] spids: [202 204 213 -1] ) (case_arm pat_list: [{<Tu>}] action: [ (command.Sentence child: (C {<echo>} {(DQ <'That was a Tuesday'>)}) terminator: <Id.Op_Semi _> ) ] spids: [216 218 227 -1] ) (case_arm pat_list: [{<We>}] action: [ (command.Sentence child: (C {<echo>} {(DQ <'That was a Wednesday'>)}) terminator: <Id.Op_Semi _> ) ] spids: [230 232 241 -1] ) (case_arm pat_list: [{<Th>}] action: [ (command.Sentence child: (C {<echo>} {(DQ <'That was a Thursday'>)}) terminator: <Id.Op_Semi _> ) ] spids: [244 246 255 -1] ) (case_arm pat_list: [{<Fr>}] action: [ (command.Sentence child: (C {<echo>} {(DQ <'That was a Friday'>)}) terminator: <Id.Op_Semi _> ) ] spids: [258 260 269 -1] ) (case_arm pat_list: [{<Sa>}] action: [ (command.Sentence child: (C {<echo>} {(DQ <'That was a Saturday'>)}) terminator: <Id.Op_Semi _> ) ] spids: [272 274 283 -1] ) ] ) ] ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )