(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:bytes_in_gb) op: assign_op.Equal rhs: {<1048576>} spids: [10] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:host) op: assign_op.Equal rhs: {(DQ <intuitive.com>)} 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.Simple words: [ {<echo>} { (DQ <'Usage: '> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<basename>} {($ Id.VSub_Number '$0')}) ) <' logfile'> ) } ] 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: [25 39] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-r>} {(DQ ($ Id.VSub_Number '$1'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ <'Error: log file '> ($ Id.VSub_Number '$1') <' not found.'>)}] 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: [65 81] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:firstdate) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<head>} {<-1>} {(DQ ($ Id.VSub_Number '$1'))}) (C {<awk>} {(SQ <'{print $4}'>)}) (C {<sed>} {(SQ <'s/\\[//'>)}) ] negated: F ) ) ) } spids: [103] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lastdate) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<tail>} {<-1>} {(DQ ($ Id.VSub_Number '$1'))}) (C {<awk>} {(SQ <'{print $4}'>)}) (C {<sed>} {(SQ <'s/\\[//'>)}) ] negated: F ) ) ) } spids: [132] ) ] ) (C {<echo>} {(DQ <'Results of analyzing log file '> ($ Id.VSub_Number '$1'))}) (C {<echo>} {(DQ )}) (C {<echo>} { (DQ <' Start date: '> (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$firstdate')}) (C {<sed>} {(SQ <'s/:/ at /'>)}) ] negated: F ) ) ) } ) (C {<echo>} { (DQ <' End date: '> (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$lastdate')}) (C {<sed>} {(SQ <'s/:/ at /'>)}) ] negated: F ) ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:hits) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (command.Simple words: [{<wc>} {<-l>}] redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {(DQ ($ Id.VSub_Number '$1'))} ) ] do_fork: T ) (C {<sed>} {(SQ <'s/[^[:digit:]]//g'>)}) ] negated: F ) ) ) } spids: [209] ) ] ) (C {<echo>} { (DQ <' Hits: '> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<nicenumber>} {($ Id.VSub_DollarName '$hits')}) ) <' (total accesses)'> ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pages) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<grep>} {<-ivE>} {(SQ <'(.txt|.gif|.jpg|.png)'>)} {(DQ ($ Id.VSub_Number '$1'))} ) (C {<wc>} {<-l>}) (C {<sed>} {(SQ <'s/[^[:digit:]]//g'>)}) ] negated: F ) ) ) } spids: [246] ) ] ) (C {<echo>} { (DQ <' Pageviews: '> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<nicenumber>} {($ Id.VSub_DollarName '$pages')}) ) <' (hits minus graphics)'> ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:totalbytes) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<awk>} {(SQ <'{sum+=$10} END {print sum}'>)} {(DQ ($ Id.VSub_Number '$1'))}) ) ) } spids: [291] ) ] ) (C {<'/bin/echo'>} {<-n>} { (DQ <' Transferred: '> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<nicenumber>} {($ Id.VSub_DollarName '$totalbytes')}) ) <' bytes '> ) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$totalbytes')} {<-gt>} {($ Id.VSub_DollarName '$bytes_in_gb')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} { (DQ <'('> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<scriptbc>} {($ Id.VSub_DollarName '$totalbytes')} {<'/'>} {($ Id.VSub_DollarName '$bytes_in_gb')} ) ) <' GB)'> ) } ) ] spids: [322 336] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$totalbytes')} {<-gt>} {<1024>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} { (DQ <'('> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<scriptbc>} {($ Id.VSub_DollarName '$totalbytes')} {<'/'>} {<1024>}) ) <' MB)'> ) } ) ] spids: [355 369] ) ] else_action: [(C {<echo>} {(DQ )})] ) (C {<echo>} {(DQ )}) (C {<echo>} {(DQ <'The ten most popular pages were:'>)}) (command.Pipeline children: [ (C {<awk>} {(SQ <'{print $7}'>)} {(DQ ($ Id.VSub_Number '$1'))}) (C {<grep>} {<-ivE>} {(SQ <'(.gif|.jpg|.png)'>)}) (C {<sed>} {(SQ <'s/\\/$//g'>)}) (C {<sort>}) (C {<uniq>} {<-c>}) (C {<sort>} {<-rn>}) (C {<head>} {<-10>}) ] negated: F ) (C {<echo>} {(DQ )}) (C {<echo>} {(DQ <'The ten most common referrer URLs were:'>)}) (command.Pipeline children: [ (C {<awk>} {(SQ <'{print $11}'>)} {(DQ ($ Id.VSub_Number '$1'))}) (C {<grep>} {<-vE>} { (DQ <'(^'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <-> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <Id.Lit_Dollar '$'> <'|/www.'> ($ Id.VSub_DollarName '$host') <'|/'> ($ Id.VSub_DollarName '$host') <')'> ) } ) (C {<sort>}) (C {<uniq>} {<-c>}) (C {<sort>} {<-rn>}) (C {<head>} {<-10>}) ] negated: F ) (C {<echo>} {(DQ )}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )