(CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pwfile) op:Equal rhs:{(DQ (/etc/passwd))} spids:[14])] spids: [14] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:shadowfile) op: Equal rhs: {(DQ (/etc/shadow))} spids: [20] ) ] spids: [20] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:gfile) op:Equal rhs:{(DQ (/etc/group))} spids:[25])] spids: [25] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:hdir) op:Equal rhs:{(DQ (/home))} spids:[30])] spids: [30] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(id)} {(-un)})]) left_token: <Left_CommandSub '$('> spids: [41 45] ) ) } {(KW_Bang '!') (Lit_Other '=')} {(DQ (root))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (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:[68])] ) (C {(exit)} {(1)}) ] spids: [-1 59] ) ] spids: [-1 76] ) (C {(echo)} { (DQ ('Add new user account to ') (CommandSubPart command_list: (CommandList children:[(C {(hostname)})]) left_token: <Left_CommandSub '$('> spids: [83 85] ) ) } ) (Sentence child:(C {(echo)} {(-n)} {(DQ ('login: '))}) terminator:<Op_Semi ';'>) (C {(read)} {(login)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:uid) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(awk)} {(-F) (Lit_Other ':')} {(SQ <'{ if (big < $3 && $3 < 5000) big=$3 } END { print big + 1 }'>)} {($ VSub_Name '$pwfile')} ) ] ) left_token: <Left_CommandSub '$('> spids: [115 126] ) ) } spids: [113] ) ] spids: [113] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:homedir) op: Equal rhs: {($ VSub_Name '$hdir') (/) ($ VSub_Name '$login')} spids: [129] ) ] spids: [129] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:gid) op:Equal rhs:{($ VSub_Name '$uid')} spids:[138])] spids: [138] ) (Sentence child:(C {(echo)} {(-n)} {(DQ ('full name: '))}) terminator:<Op_Semi ';'>) (C {(read)} {(fullname)}) (Sentence child:(C {(echo)} {(-n)} {(DQ ('shell: '))}) terminator:<Op_Semi ';'>) (C {(read)} {(shell)}) (C {(echo)} {(DQ ('Setting up account ') ($ VSub_Name '$login') (' for ') ($ VSub_Name '$fullname') (...))} ) (SimpleCommand words: [ {(echo)} {(${ VSub_Name login) (Lit_Other ':') (x) (Lit_Other ':') (${ VSub_Name uid) (Lit_Other ':') (${ VSub_Name gid) (Lit_Other ':') (${ VSub_Name fullname) (Lit_Other ':') (${ VSub_Name homedir) (Lit_Other ':') ($ VSub_Name '$shell') } ] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{($ VSub_Name '$pwfile')} spids:[208])] ) (SimpleCommand words: [ {(echo)} {(${ VSub_Name login) (Lit_Other ':') (Lit_Other '*') (Lit_Other ':') (11647) (Lit_Other ':') (0) (Lit_Other ':') (99999) (Lit_Other ':') (7) (Lit_Other ':') (Lit_Other ':') (Lit_Other ':') } ] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{($ VSub_Name '$shadowfile')} spids:[231])] ) (SimpleCommand words: [ {(echo)} {(DQ (${ VSub_Name login) (':x:') (${ VSub_Name gid) (':') ($ VSub_Name '$login'))} ] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{($ VSub_Name '$gfile')} spids:[250])] ) (C {(mkdir)} {($ VSub_Name '$homedir')}) (C {(cp)} {(-R)} {(/etc/skel/.) (Lit_Other '[') (a-zA-Z) (Lit_Other ']') (Lit_Other '*')} {($ VSub_Name '$homedir')} ) (C {(chmod)} {(755)} {($ VSub_Name '$homedir')}) (C {(chown)} {(-R)} {(${ VSub_Name login) (Lit_Other ':') (${ VSub_Name login)} {($ VSub_Name '$homedir')} ) (C {(exec)} {(passwd)} {($ VSub_Name '$login')}) ] )