(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:homedir) op: assign_op.Equal rhs: {(DQ (/home))} spids: [8] ) ] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:secs) op:assign_op.Equal rhs:{(10)} spids:[16])] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(-z)} {($ Id.VSub_Number '$1')} {(Id.Lit_RBracket ']')}) terminator: (Token id:Id.Op_Semi val:';' span_id:33) ) ] action: [ (command.Sentence child: (command.Simple words: [{(echo)} {(DQ ('Usage: ') ($ Id.VSub_Number '$0') (' account'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:46) fd: -1 arg_word: {(2)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:49) ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:51) arg_word: {(1)} ) ] spids: [23 35] ) (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:60) command_list: (command.CommandList children:[(C {(id)} {(-un)})]) ) ) } {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(DQ (root))} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:76) ) ] action: [ (command.Sentence child: (command.Simple words: [{(echo)} {(DQ ("Error. You must be 'root' to run this command."))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:87) fd: -1 arg_word: {(2)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:89) ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:91) arg_word: {(1)} ) ] spids: [55 78] ) ] ) (C {(echo)} {(DQ ('Please change account ') ($ Id.VSub_Number '$1') (' password to something new.'))} ) (C {(passwd)} {($ Id.VSub_Number '$1')}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {(who)}) (command.Simple words: [{(grep)} {(DQ ($ Id.VSub_Number '$1'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:124) fd: -1 arg_word: {(/dev/null)} ) ] ) ] negated: F ) terminator: (Token id:Id.Op_Semi val:';' span_id:128) ) ] action: [ (command.ForEach iter_name: tty iter_words: [ { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:140) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(who)}) (C {(grep)} {($ Id.VSub_Number '$1')}) (C {(awk)} {(SQ (Token id:Id.Lit_Chars val:'{print $2}' span_id:154))}) ] negated: F ) ] ) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.Simple words: [{(cat)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:165) fd: -1 here_begin: {(DQ (EOF))} here_end_span_id: 187 stdin_parts: [ ('\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') ] ) (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:171) fd: -1 arg_word: {(/dev/) ($ Id.VSub_DollarName '$tty')} ) ] ) ] ) ) (C {(echo)} { (DQ ('(Warned ') ($ Id.VSub_Number '$1') (', now sleeping ') ($ Id.VSub_DollarName '$secs') (' seconds)') ) } ) (C {(sleep)} {($ Id.VSub_DollarName '$secs')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:jobs) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:212) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(ps)} {(-u)} {($ Id.VSub_Number '$1')}) (C {(cut)} {(-d) (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\ ' span_id:224) ) } {(-f1)} ) ] negated: F ) ] ) ) } spids: [211] ) ] ) (C {(kill)} {(-s)} {(HUP)} {($ Id.VSub_DollarName '$jobs')}) (C {(sleep)} {(1)}) (command.Simple words: [{(kill)} {(-s)} {(KILL)} {($ Id.VSub_DollarName '$jobs')}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:259) fd: -1 arg_word: {(/dev/null)} ) (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:263) fd: 2 arg_word: {(1)} ) ] ) (C {(echo)} {(DQ ($ Id.VSub_Number '$1') (' was logged in. Just logged them out.'))}) ] spids: [114 130] ) ] ) (C {(chmod)} {(000)} {($ Id.VSub_DollarName '$homedir') (/) ($ Id.VSub_Number '$1')}) (C {(echo)} {(DQ ('Account ') ($ Id.VSub_Number '$1') (' has been suspended.'))}) (command.ControlFlow token:(Token id:Id.ControlFlow_Exit val:exit span_id:302) arg_word:{(0)}) ] )