(CommandList children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Pound "$#"))} {(-lt)} {(DQ (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: [105 109] ) (" timeout_in_seconds command") ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[113])] ) (SimpleCommand words: [ {(echo)} { (DQ ("Example: ") (CommandSubPart command_list: (CommandList children:[(C {(basename)} {($ VSub_Number "$0")})]) left_token: <Left_Backtick "`"> spids: [121 125] ) (" 2 sleep 3 || echo timeout") ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[129])] ) (C {(exit)} {(1)}) ] spids: [-1 98] ) ] spids: [-1 137] ) (FuncDef name: cleanup body: (BraceGroup children: [ (C {(trap)} {(-)} {(ALRM)}) (SimpleCommand words: [{(kill)} {(-ALRM)} {($ VSub_Name "$a")}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[163])] ) (AndOr children: [ (SimpleCommand words: [{(kill)} {($ VSub_Bang "$!")}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[174])] ) (C {(exit)} {(124)}) ] op_id: Op_DAmp ) ] spids: [144] ) spids: [140 143] ) (FuncDef name: watchit body: (BraceGroup children: [ (C {(trap)} {(DQ (cleanup))} {(ALRM)}) (Sentence child:(C {(sleep)} {($ VSub_Number "$1")}) terminator:<Op_Amp "&">) (C {(wait)}) (C {(kill)} {(-ALRM)} {($ VSub_Dollar "$$")}) ] spids: [197] ) spids: [193 196] ) (Sentence child:(C {(watchit)} {($ VSub_Number "$1")}) terminator:<Op_Amp "&">) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:a) op:Equal rhs:{($ VSub_Bang "$!")} spids:[231])] spids: [231] ) (C {(shift)}) (C {(trap)} {(DQ (cleanup))} {(ALRM)} {(INT)}) (Sentence child:(C {(DQ ($ VSub_At "$@"))}) terminator:<Op_Amp "&">) (Sentence child:(C {(wait)} {($ VSub_Bang "$!")}) terminator:<Op_Semi ";">) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:RET) op:Equal rhs:{($ VSub_QMark "$?")} spids:[265])] spids: [265] ) (C {(kill)} {(-ALRM)} {($ VSub_Name "$a")}) (C {(wait)} {($ VSub_Name "$a")}) (C {(exit)} {($ VSub_Name "$RET")}) ] )