(CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:homedir) op:Equal rhs:{(DQ (/home))} spids:[8])] spids: [8] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:secs) op:Equal rhs:{(10)} spids:[16])] spids: [16] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-z)} {($ VSub_Number '$1')} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (SimpleCommand words: [{(echo)} {(DQ ('Usage: ') ($ VSub_Number '$0') (' account'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[46])] ) terminator: <Op_Semi ';'> ) (C {(exit)} {(1)}) ] spids: [-1 35] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(id)} {(-un)})]) left_token: <Left_CommandSub '$('> spids: [60 64] ) ) } {(KW_Bang '!') (Lit_Other '=')} {(DQ (root))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (SimpleCommand words: [{(echo)} {(DQ ("Error. You must be 'root' to run this command."))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[87])] ) terminator: <Op_Semi ';'> ) (C {(exit)} {(1)}) ] spids: [55 78] ) ] spids: [-1 95] ) (C {(echo)} {(DQ ('Please change account ') ($ VSub_Number '$1') (' password to something new.'))}) (C {(passwd)} {($ VSub_Number '$1')}) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(who)}) (SimpleCommand words: [{(grep)} {(DQ ($ VSub_Number '$1'))}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[124])] ) ] negated: False ) terminator: <Op_Semi ';'> ) ] action: [ (ForEach iter_name: tty iter_words: [ { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(who)}) (C {(grep)} {($ VSub_Number '$1')}) (C {(awk)} {(SQ <'{print $2}'>)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [140 156] ) } ] do_arg_iter: False body: (DoGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {('\n') ('*************************************************************\n') ('URGENT NOTICE FROM THE ADMINISTRATOR:\n') ('\n') ( 'This account is being suspended, and you are going to be logged out \n' ) ('in $secs seconds. Please immediately shut down any processes you \n') ('have running and log out.\n') ('\n') ('If you have any questions, please contact your supervisor or \n') ('John Doe, Director of Information Technology.\n') ('*************************************************************\n') } do_expansion: False here_end: EOF was_filled: True spids: [165] ) (Redir op_id: Redir_Great fd: -1 arg_word: {(/dev/) ($ VSub_Name '$tty')} spids: [171] ) ] ) ] spids: [159 177] ) spids: [139 157] ) (C {(echo)} { (DQ ('(Warned ') ($ VSub_Number '$1') (', now sleeping ') ($ VSub_Name '$secs') (' seconds)') ) } ) (C {(sleep)} {($ VSub_Name '$secs')}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:jobs) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(ps)} {(-u)} {($ VSub_Number '$1')}) (C {(cut)} {(-d) (EscapedLiteralPart token:<Lit_EscapedChar '\\ '>)} {(-f1)} ) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [200 215] ) } spids: [199] ) ] spids: [199] ) (C {(kill)} {(-s)} {(HUP)} {($ VSub_Name '$jobs')}) (C {(sleep)} {(1)}) (SimpleCommand words: [{(kill)} {(-s)} {(KILL)} {($ VSub_Name '$jobs')}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[247]) (Redir op_id:Redir_Great fd:2 arg_word:{(1)} spids:[251]) ] ) (C {(echo)} {(DQ ($ VSub_Number '$1') (' was logged in. Just logged them out.'))}) ] spids: [-1 130] ) ] spids: [-1 266] ) (C {(chmod)} {(000)} {($ VSub_Name '$homedir') (/) ($ VSub_Number '$1')}) (C {(echo)} {(DQ ('Account ') ($ VSub_Number '$1') (' has been suspended.'))}) (C {(exit)} {(0)}) ] )