(command.CommandList children: [ (command.Case to_match: {(DQ (command_sub left_token:<Id.Left_Backtick '`'> child:(C {<id>})))} arms: [ (case_arm pat_list:[{(SQ <'uid=0('>) <Id.Lit_Star '*'>}] spids:[25 29 31 -1]) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.Simple words: [{<echo>} {(DQ ($ Id.VSub_Number '$0') <': must be run by root'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [33 34 -1 51] ) ] ) (command.Pipeline children: [ (BraceGroup children: [ (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <EOF>)} here_end_span_id: 145 stdin_parts: [ <'drwxr-xr-x\troot\toperator\t/\n'> <'drwxr-xr-x\tbin\toperator\t/bin\n'> <'drwxr-xr-x\troot\toperator\t/dev\n'> <'drwxr-xr-x\troot\toperator\t/etc\n'> <'-rw-r--r--\troot\toperator\t/etc/fstab\n'> <'-rw-r--r--\troot\toperator\t/etc/group\n'> <'-rw-r--r--\troot\toperator\t/etc/hostname.file\n'> <'-rw-r--r--\troot\toperator\t/etc/inet.conf\n'> <'-rw-r--r--\troot\toperator\t/etc/motd\n'> <'-rw-r--r--\troot\toperator\t/etc/mtab\n'> <'-rw-r--r--\troot\toperator\t/etc/passwd\n'> <'-rw-r--r--\troot\toperator\t/etc/profile\n'> <'-rw-r--r--\troot\toperator\t/etc/protocols\n'> <'-rw-r--r--\troot\toperator\t/etc/rc\n'> <'-rw-r--r--\troot\toperator\t/etc/services\n'> <'-rw-------\troot\toperator\t/etc/shadow\n'> <'-rw-r--r--\troot\toperator\t/etc/termcap\n'> <'-rw-r--r--\troot\toperator\t/etc/ttytab\n'> <'-rw-r--r--\troot\toperator\t/etc/utmp\n'> <'dr-xr-xr-x\troot\toperator\t/mnt\n'> <'dr-xr-xr-x\troot\toperator\t/root\n'> <'drwxrwxrwx\troot\toperator\t/tmp\n'> <'drwxr-xr-x\troot\toperator\t/usr\n'> <'drwxr-xr-x\troot\toperator\t/usr/adm\n'> <'-rw-r--r--\troot\toperator\t/usr/adm/lastlog\n'> <'-rw-r--r--\troot\toperator\t/usr/adm/wtmp\n'> <'drwxr-xr-x\tast\tother\t\t/usr/ast\n'> <'drwxr-xr-x\tbin\toperator\t/usr/bin\n'> <'drwxr-xr-x\troot\toperator\t/usr/etc\n'> <'drwxr-xr-x\tbin\toperator\t/usr/include\n'> <'drwxr-xr-x\tbin\toperator\t/usr/lib\n'> <'drwxrwxr-x\troot\toperator\t/usr/local\n'> <'drwxrwxr-x\tbin\toperator\t/usr/local/bin\n'> <'drwxrwxr-x\tbin\toperator\t/usr/local/include\n'> <'drwxrwxr-x\tbin\toperator\t/usr/local/lib\n'> <'drwxrwxr-x\tbin\toperator\t/usr/local/man\n'> <'drwxrwxr-x\tbin\toperator\t/usr/local/src\n'> <'drwxr-xr-x\tbin\toperator\t/usr/man\n'> <'drwxr-xr-x\tbin\toperator\t/usr/mdec\n'> <'drwx------\troot\toperator\t/usr/preserve\n'> <'drwxr-xr-x\troot\toperator\t/usr/run\n'> <'drwxr-xr-x\troot\toperator\t/usr/spool\n'> <'drwx--x--x\troot\toperator\t/usr/spool/at\n'> <'drwx--x--x\troot\toperator\t/usr/spool/at/past\n'> <'drwx------\troot\toperator\t/usr/spool/crontabs\n'> <'drwxrwxr-x\troot\tuucp\t\t/usr/spool/locks\n'> <'drwx------\tdaemon\tdaemon\t\t/usr/spool/lpd\n'> <'drwxr-xr-x\tbin\toperator\t/usr/src\n'> <'drwxrwxrwx\troot\toperator\t/usr/tmp\n'> <'-rwsr-xr-x\troot\t?\t\t/usr/bin/at\n'> <'-rwsr-xr-x\troot\t?\t\t/usr/bin/chfn\n'> <'-rwsr-xr-x\troot\t?\t\t/usr/bin/chsh\n'> <'-rwsr-xr-x\troot\t?\t\t/usr/bin/df\n'> <'-rwsr-xr-x\troot\t?\t\t/usr/bin/elvprsv\n'> <'-rwsr-xr-x\troot\t?\t\t/usr/bin/elvrec\n'> <'-rwsr-xr-x\troot\t?\t\t/usr/bin/format\n'> <'-rwsr-xr-x\troot\t?\t\t/usr/bin/hostaddr\n'> <'-rwsr-xr-x\troot\t?\t\t/usr/bin/install\n'> <'-rwsr-xr-x\tdaemon\t?\t\t/usr/bin/lpd\n'> <'-rwsr-xr-x\troot\t?\t\t/usr/bin/mail\n'> <'-rwsr-xr-x\troot\t?\t\t/usr/bin/mount\n'> <'-rwsr-xr-x\troot\t?\t\t/usr/bin/passwd\n'> <'-rwsr-xr-x\troot\t?\t\t/usr/bin/ping\n'> <'-rwxr-sr-x\t?\tkmem\t\t/usr/bin/ps\n'> <'-rwsr-xr--\troot\t?\t\t/usr/bin/shutdown\n'> <'-rwsr-xr-x\troot\t?\t\t/usr/bin/su\n'> <'-rwxr-sr-x\t?\tuucp\t\t/usr/bin/term\n'> <'-rwsr-xr-x\troot\t?\t\t/usr/bin/umount\n'> <'-rwxr-sr-x\t?\ttty\t\t/usr/bin/write\n'> ] ) ) ] do_fork: T ) ] ) (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:banner) op: assign_op.Equal rhs: { (DQ <'# List of commands to fix the top level hierarchy. Do not apply these\n'> <'# commands blindly, but check and repair by hand.\n'> ) } spids: [162] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands:[(C {<read>} {<mode>} {<owner>} {<group>} {<file>})]) body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Subshell child: (command.CommandList children: [ (C {<set>} {<-> ($ Id.VSub_Hyphen '$-')} { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Simple words: [{<ls>} {<-ld>} {($ Id.VSub_DollarName '$file')}] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ) } {(SQ )} {(SQ )} {(SQ )} {(SQ )} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:curmode) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [225] ) (assign_pair lhs: (sh_lhs_expr.Name name:curowner) op: assign_op.Equal rhs: {($ Id.VSub_Number '$3')} spids: [228] ) (assign_pair lhs: (sh_lhs_expr.Name name:curgroup) op: assign_op.Equal rhs: {($ Id.VSub_Number '$4')} spids: [231] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<test>} {($ Id.VSub_DollarName '$owner')} {<Id.Lit_Equals '='>} {(SQ <'?'>)} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:curowner) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$owner')} spids: [247] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<test>} {($ Id.VSub_DollarName '$group')} {<Id.Lit_Equals '='>} {(SQ <'?'>)} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:curgroup) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$group')} spids: [263] ) ] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<x> (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {(DQ ($ Id.VSub_DollarName '$mode'))} {<Id.Lit_Colon ':'>} {(SQ <'\\(.\\)'>)} ) ) } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<x> (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {(DQ ($ Id.VSub_DollarName '$curmode'))} {<Id.Lit_Colon ':'>} {(SQ <'\\(.\\)'>)} ) ) } {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.Case to_match: {($ Id.VSub_DollarName '$curmode')} arms: [ (case_arm pat_list: [{<Id.Lit_QMark '?'> <Id.Lit_Star '*'>}] action: [ (C {<echo>} { (DQ (${ Id.VSub_Name banner) <'rm -r '> ($ Id.VSub_DollarName '$file') ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:banner) op: assign_op.Equal rhs: (word.Empty) spids: [351] ) ] ) ] spids: [336 338 -1 354] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:curmode) op: assign_op.Equal rhs: (word.Empty) spids: [357] ) (assign_pair lhs: (sh_lhs_expr.Name name:curowner) op: assign_op.Equal rhs: (word.Empty) spids: [359] ) (assign_pair lhs: (sh_lhs_expr.Name name:curgroup) op: assign_op.Equal rhs: (word.Empty) spids: [361] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$mode')} arms: [ (case_arm pat_list: [{<d> <Id.Lit_Star '*'>}] action: [ (C {<echo>} { (DQ (${ Id.VSub_Name banner) <'mkdir '> ($ Id.VSub_DollarName '$file') ) } ) ] spids: [371 373 386 -1] ) (case_arm pat_list: [{<-> <Id.Lit_Star '*'>}] action: [ (C {<echo>} { (DQ (${ Id.VSub_Name banner) <'> '> ($ Id.VSub_DollarName '$file') ) } ) ] spids: [389 391 404 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.Simple words: [ {<echo>} { (DQ ($ Id.VSub_Number '$0') <': '> ($ Id.VSub_DollarName '$mode') <' '> ($ Id.VSub_DollarName '$file') <': unknown filetype'> ) } ] redirects: [ (redir op: <Id.Redir_GreatAnd '>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [407 408 -1 430] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:banner) op: assign_op.Equal rhs: (word.Empty) spids: [433] ) ] ) ] spids: [272 326] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<x> ($ Id.VSub_DollarName '$mode')} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<x> ($ Id.VSub_DollarName '$curmode')} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:octmode) op: assign_op.Equal rhs: (word.Empty) spids: [463] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:m) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$mode')} spids: [466] ) ] ) (command.ForEach iter_name: i iter_words: [{<u>} {<g>} {<o>}] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: assign_op.Equal rhs: {<0>} spids: [486] ) (assign_pair lhs: (sh_lhs_expr.Name name:w) op: assign_op.Equal rhs: {<0>} spids: [489] ) (assign_pair lhs: (sh_lhs_expr.Name name:x) op: assign_op.Equal rhs: {<0>} spids: [492] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$m')} arms: [ (case_arm pat_list: [ {<Id.Lit_QMark '?'> <r> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_Star '*'> } ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: assign_op.Equal rhs: {<4>} spids: [510] ) ] ) ] spids: [503 508 -1 514] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$m')} arms: [ (case_arm pat_list: [ {<Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <w> <Id.Lit_QMark '?'> <Id.Lit_Star '*'> } ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:w) op: assign_op.Equal rhs: {<2>} spids: [531] ) ] ) ] spids: [524 529 -1 535] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$m')} arms: [ (case_arm pat_list: [ {<Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_LBracket '['> <xst> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'> } ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:x) op: assign_op.Equal rhs: {<1>} spids: [554] ) ] ) ] spids: [545 552 -1 558] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:octmode) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$octmode') (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {($ Id.VSub_DollarName '$r')} {<Id.Lit_Other '+'>} {($ Id.VSub_DollarName '$w')} {<Id.Lit_Other '+'>} {($ Id.VSub_DollarName '$x')} ) ) } spids: [561] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:m) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {($ Id.VSub_DollarName '$m')} {<Id.Lit_Colon ':'>} {(SQ <'...\\(.*\\)'>)} ) ) } spids: [580] ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: assign_op.Equal rhs: {<0>} spids: [603] ) (assign_pair lhs: (sh_lhs_expr.Name name:w) op: assign_op.Equal rhs: {<0>} spids: [606] ) (assign_pair lhs: (sh_lhs_expr.Name name:x) op: assign_op.Equal rhs: {<0>} spids: [609] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$mode')} arms: [ (case_arm pat_list: [ {<Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_LBracket '['> <Id.Lit_VarLike 'sS='> <Id.Lit_RBracket ']'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> } ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: assign_op.Equal rhs: {<4>} spids: [634] ) ] ) ] spids: [620 632 -1 638] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$mode')} arms: [ (case_arm pat_list: [ {<Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_LBracket '['> <Id.Lit_VarLike 'sS='> <Id.Lit_RBracket ']'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> } ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:w) op: assign_op.Equal rhs: {<2>} spids: [662] ) ] ) ] spids: [648 660 -1 666] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$mode')} arms: [ (case_arm pat_list: [ {<Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_LBracket '['> <Id.Lit_VarLike 'tT='> <Id.Lit_RBracket ']'> } ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:x) op: assign_op.Equal rhs: {<1>} spids: [690] ) ] ) ] spids: [676 688 -1 694] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$r') ($ Id.VSub_DollarName '$w') ($ Id.VSub_DollarName '$x') } arms: [ (case_arm pat_list: [{<000>}] spids: [706 707 709 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:octmode) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {($ Id.VSub_DollarName '$r')} {<Id.Lit_Other '+'>} {($ Id.VSub_DollarName '$w')} {<Id.Lit_Other '+'>} {($ Id.VSub_DollarName '$x')} ) ) ($ Id.VSub_DollarName '$octmode') } spids: [715] ) ] ) ] spids: [712 713 -1 734] ) ] ) (C {<echo>} { (DQ (${ Id.VSub_Name banner) <'chmod '> ($ Id.VSub_DollarName '$octmode') <' '> ($ Id.VSub_DollarName '$file') ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:banner) op: assign_op.Equal rhs: (word.Empty) spids: [751] ) ] ) ] spids: [444 460] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<x> ($ Id.VSub_DollarName '$owner')} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<x> ($ Id.VSub_DollarName '$curowner')} {<-o>} {<x> ($ Id.VSub_DollarName '$group')} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<x> ($ Id.VSub_DollarName '$curgroup')} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<echo>} { (DQ (${ Id.VSub_Name banner) <'chown '> ($ Id.VSub_DollarName '$owner') <':'> ($ Id.VSub_DollarName '$group') <' '> ($ Id.VSub_DollarName '$file') ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:banner) op: assign_op.Equal rhs: (word.Empty) spids: [807] ) ] ) ] spids: [762 789] ) ] ) (C {<wait>}) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$banner'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [ (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [830 832 837 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<0>} ) ] spids: [839 840 845 -1] ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:banner) op: assign_op.Equal rhs: (word.Empty) spids: [852] ) ] ) ] ) ] ) ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$banner'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [(command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})] spids: [867 869 -1 876] ) ] ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] ) ] negated: F ) ] )