(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:maxarchivedir) op: assign_op.Equal rhs: {<10>} spids: [7] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:compress) op: assign_op.Equal rhs: {<gzip>} spids: [13] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:progname) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<basename>} {($ Id.VSub_Number '$0')}) ) } spids: [19] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Sentence child: (command.Simple words: [{<echo>} {(DQ <'Usage: '> ($ Id.VSub_DollarName '$progname') <' directory'>)}] 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: [30 44] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {($ Id.VSub_Number '$1')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Sentence child: (command.Simple words: [ {<echo>} { (DQ (${ Id.VSub_Name progname) <': can\'t find directory '> ($ Id.VSub_Number '$1') <' to archive.'> ) } ] 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: [69 83] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<basename>} {($ Id.VSub_Number '$1')}) ) ) } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ ($ Id.VSub_Number '$1'))} {<-o>} {(DQ ($ Id.VSub_Number '$1'))} {<Id.Lit_Equals '='>} {(DQ <.>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ (${ Id.VSub_Name progname) <': you must specify a subdirectory'>)}] 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: [108 143] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-w>} {<.>} {<Id.Lit_RBracket ']'>}) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} { (DQ (${ Id.VSub_Name progname) <': cannot write archive file to current directory.'>) } ] 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: [166 180] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dirsize) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<du>} {<-s>} {($ Id.VSub_Number '$1')}) (C {<awk>} {(SQ <'{print $1}'>)}) ] negated: F ) ) ) } spids: [207] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$dirsize')} {<-gt>} {($ Id.VSub_DollarName '$maxarchivedir')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} {<-n>} { (DQ <'Warning: directory '> ($ Id.VSub_Number '$1') <' is '> ($ Id.VSub_DollarName '$dirsize') <' blocks. Proceed? [n] '> ) } ) (C {<read>} {<answer>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:answer) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$answer')}) (C {<tr>} {(SQ <'[:upper:]'>)} {(SQ <'[:lower:]'>)}) (C {<cut>} {<-c1>}) ] negated: F ) ) ) } spids: [263] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$answer'))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <y>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} { (DQ (${ Id.VSub_Name progname) <': archive of directory '> ($ Id.VSub_Number '$1') <' canceled.'> ) } ] 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: {<0>} ) ] spids: [291 310] ) ] ) ] spids: [227 241] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:archivename) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1') <.tgz>)} spids: [338] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [ (C {<tar>} {<cf>} {<->} {($ Id.VSub_Number '$1')}) (command.Simple words: [{($ Id.VSub_DollarName '$compress')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$archivename')} ) ] do_fork: T ) ] negated: F ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} { (DQ <'Directory '> ($ Id.VSub_Number '$1') <' archived as '> ($ Id.VSub_DollarName '$archivename') ) } ) ] spids: [345 365] ) ] else_action: [ (C {<echo>} {(DQ <'Warning: tar encountered errors archiving '> ($ Id.VSub_Number '$1'))}) ] ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )