(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: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {($ Id.VSub_Number '$1')} {<Id.Lit_RBracket ']'>}) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Sentence child: (command.Simple words: [{<echo>} {(DQ <'Usage: '> ($ Id.VSub_Number '$0') <' account'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [23 35] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<id>} {<-un>})))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <root>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Sentence child: (command.Simple words: [{<echo>} {(DQ <'Error. You must be \'root\' to run this command.'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> 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: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [ (C {<who>}) (command.Simple words: [{<grep>} {(DQ ($ Id.VSub_Number '$1'))}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) ] negated: F ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ForEach iter_name: tty iter_words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<who>}) (C {<grep>} {($ Id.VSub_Number '$1')}) (C {<awk>} {(SQ <'{print $2}'>)}) ] negated: F ) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc 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 op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/'> ($ Id.VSub_DollarName '$tty')} ) ] do_fork: T ) ] ) ) (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: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<ps>} {<-u>} {($ Id.VSub_Number '$1')}) (C {<cut>} {<-d> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\ '>)} {<-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 op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<1>}) ] do_fork: T ) (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:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )