(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:file) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [75] ) ] spids: [75] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:epoch) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [80] ) ] spids: [80] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Name '$file'))} {(Lit_Other ']')} ) (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-ne)} {(1)} {(-a)} {($ VSub_Pound '$#')} {(-ne)} {(2)} {(Lit_Other ']')} ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ('Usage: ') (CommandSubPart command_list: (CommandList children:[(C {(basename)} {($ VSub_Number '$0')})]) left_token: <Left_Backtick '`'> spids: [128 132] ) (' file [epoch]') ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[136])] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 121] ) ] spids: [16777215 144] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$epoch'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:epoch) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(date)} {(--reference) (Lit_Other '=') (DQ ($ VSub_Name '$file'))} {(Lit_Other '+') (Lit_Other '%') (s.) (Lit_Other '%') (N)} ) ] ) left_token: <Left_Backtick '`'> spids: [164 178] ) } spids: [163] ) ] spids: [163] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) ] spids: [16777215 160] ) ] else_action: [ (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$epoch'))}) (C {(grep)} {(-Eq)} {(DQ ('^[') (Lit_Other '\\') ('+-]'))}) ] negated: F ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ('Epochs with leading +/- are ambiguous with editor options'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[219])] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 210] ) ] spids: [16777215 228] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [ {(date)} {(--date) (Lit_Other '=') (DQ ('1970-01-01 UTC ') ($ VSub_Name '$epoch') (' seconds')) } ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [245] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [248] ) ] ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ('Invalid epoch specified [') ($ VSub_Name '$epoch') (']'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[263])] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 252] ) ] spids: [16777215 272] ) ] spids: [186 274] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [(C {(echo)} {(DQ ($ VSub_Name '$epoch'))}) (C {(grep)} {(-Fq)} {(DQ (.))})] negated: F ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:seconds) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$epoch')}) (C {(cut)} {(-d.)} {(-f1)}) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [303 315] ) } spids: [302] ) ] spids: [302] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(echo)} {($ VSub_Name '$epoch')}) (C {(grep)} {(-Eq)} {(DQ (Lit_Other '\\') ('.0+') (Lit_Other '$'))}) ] negated: F ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:epoch) op: Equal rhs: {($ VSub_Name '$seconds')} spids: [343] ) ] spids: [343] ) ] spids: [16777215 337] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:checkns) op: Equal rhs: {(DQ (true))} spids: [353] ) ] spids: [353] ) ] spids: [350 362] ) ] spids: [16777215 296] ) ] spids: [16777215 364] ) (C { (BracedVarSub token: <VSub_Name EDITOR> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(vim)}) spids: [366 370] ) } {(DQ ($ VSub_Name '$file'))} ) (AndOr ops: [Op_DAmp Op_DPipe] children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$seconds'))} {(Lit_Other ']')}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:err) op:Equal rhs:{(DQ (/dev/tty))} spids:[388])] spids: [388] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:err) op:Equal rhs:{(DQ (/dev/null))} spids:[395])] spids: [395] ) ] ) (SimpleCommand words: [ {(touch)} {(DQ ($ VSub_Name '$file'))} {(--date) (Lit_Other '=') (DQ ('1970-01-01 UTC ') ($ VSub_Name '$epoch') (' seconds'))} ] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{($ VSub_Name '$err')} spids:[414])] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_QMark '$?')} {(-ne)} {(0)} {(-a)} {(DQ ($ VSub_Name '$seconds'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DAmp] children: [ (C {(touch)} {(DQ ($ VSub_Name '$file'))} {(--date) (Lit_Other '=') (DQ ('1970-01-01 UTC ') ($ VSub_Name '$seconds') (' seconds')) } ) (SimpleCommand words: [{(echo)} {(DQ ('Warning: sub second portion of timestamp ignored'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[465])] ) ] ) ] spids: [16777215 436] ) ] else_action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$checkns'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:new_ts) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(date)} {(--reference) (Lit_Other '=') (DQ ($ VSub_Name '$file'))} {(Lit_Other '+') (Lit_Other '%') (s.) (Lit_Other '%') (N)} ) ] ) left_token: <Left_Backtick '`'> spids: [486 500] ) } spids: [485] ) ] spids: [485] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:diff) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} { (DQ ('((') ($ VSub_Name '$epoch') (-) ($ VSub_Name '$new_ts') (')*10^9)/1') ) } ) (C {(bc)}) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [504 518] ) } spids: [503] ) ] spids: [503] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Name '$diff')} {(-ne)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} {(DQ ('Warning: timestamp set ') (${ VSub_Name diff) ('ns backwards'))} ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 16777215 arg_word: {(2)} spids: [547] ) ] ) ] spids: [16777215 534] ) ] spids: [16777215 551] ) ] spids: [16777215 482] ) ] spids: [16777215 554] ) ] spids: [468 556] ) ] )