(CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:bytes_in_gb) op:Equal rhs:{(1048576)} spids:[10])] spids: [10] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:host) op:Equal rhs:{(DQ (intuitive.com))} spids:[19])] spids: [19] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-eq)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ('Usage: ') (CommandSubPart command_list: (CommandList children:[(C {(basename)} {($ VSub_Number '$0')})]) left_token: <Left_CommandSub '$('> spids: [46 50] ) (' logfile') ) } ] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 39] ) ] spids: [16777215 62] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-r)} {(DQ ($ VSub_Number '$1'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ('Error: log file ') ($ VSub_Number '$1') (' not found.'))}] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 81] ) ] spids: [16777215 100] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:firstdate) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(head)} {(-1)} {(DQ ($ VSub_Number '$1'))}) (C {(awk)} {(SQ <'{print $4}'>)}) (C {(sed)} {(SQ <'s/\\[//'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [105 129] ) ) } spids: [103] ) ] spids: [103] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:lastdate) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(tail)} {(-1)} {(DQ ($ VSub_Number '$1'))}) (C {(awk)} {(SQ <'{print $4}'>)}) (C {(sed)} {(SQ <'s/\\[//'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [134 158] ) ) } spids: [132] ) ] spids: [132] ) (C {(echo)} {(DQ ('Results of analyzing log file ') ($ VSub_Number '$1'))}) (C {(echo)} {(DQ )}) (C {(echo)} { (DQ (' Start date: ') (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(echo)} {($ VSub_Name '$firstdate')}) (C {(sed)} {(SQ <'s/:/ at /'>)})] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [178 188] ) ) } ) (C {(echo)} { (DQ (' End date: ') (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(echo)} {($ VSub_Name '$lastdate')}) (C {(sed)} {(SQ <'s/:/ at /'>)})] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [195 205] ) ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:hits) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (SimpleCommand words: [{(wc)} {(-l)}] redirects: [ (Redir op: <Redir_Less '<'> fd: 16777215 arg_word: {(DQ ($ VSub_Number '$1'))} ) ] ) (C {(sed)} {(SQ <'s/[^[:digit:]]//g'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [211 229] ) ) } spids: [209] ) ] spids: [209] ) (C {(echo)} { (DQ (' Hits: ') (CommandSubPart command_list: (CommandList children:[(C {(nicenumber)} {($ VSub_Name '$hits')})]) left_token: <Left_CommandSub '$('> spids: [237 241] ) (' (total accesses)') ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pages) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(grep)} {(-ivE)} {(SQ <'(.txt|.gif|.jpg|.png)'>)} {(DQ ($ VSub_Number '$1'))} ) (C {(wc)} {(-l)}) (C {(sed)} {(SQ <'s/[^[:digit:]]//g'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [248 274] ) ) } spids: [246] ) ] spids: [246] ) (C {(echo)} { (DQ (' Pageviews: ') (CommandSubPart command_list: (CommandList children:[(C {(nicenumber)} {($ VSub_Name '$pages')})]) left_token: <Left_CommandSub '$('> spids: [282 286] ) (' (hits minus graphics)') ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:totalbytes) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(awk)} {(SQ <'{sum+=$10} END {print sum}'>)} {(DQ ($ VSub_Number '$1'))}) ] ) left_token: <Left_CommandSub '$('> spids: [293 303] ) ) } spids: [291] ) ] spids: [291] ) (C {(/bin/echo)} {(-n)} { (DQ (' Transferred: ') (CommandSubPart command_list: (CommandList children:[(C {(nicenumber)} {($ VSub_Name '$totalbytes')})]) left_token: <Left_CommandSub '$('> spids: [313 317] ) (' bytes ') ) } ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Name '$totalbytes')} {(-gt)} {($ VSub_Name '$bytes_in_gb')} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ('(') (CommandSubPart command_list: (CommandList children: [ (C {(scriptbc)} {($ VSub_Name '$totalbytes')} {(/)} {($ VSub_Name '$bytes_in_gb')} ) ] ) left_token: <Left_CommandSub '$('> spids: [343 351] ) (' GB)') ) } ) ] spids: [16777215 336] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Name '$totalbytes')} {(-gt)} {(1024)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ('(') (CommandSubPart command_list: (CommandList children: [(C {(scriptbc)} {($ VSub_Name '$totalbytes')} {(/)} {(1024)})] ) left_token: <Left_CommandSub '$('> spids: [376 384] ) (' MB)') ) } ) ] spids: [355 369] ) ] else_action: [(C {(echo)} {(DQ )})] spids: [388 396] ) (C {(echo)} {(DQ )}) (C {(echo)} {(DQ ('The ten most popular pages were:'))}) (Pipeline children: [ (C {(awk)} {(SQ <'{print $7}'>)} {(DQ ($ 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:'))}) (Pipeline children: [ (C {(awk)} {(SQ <'{print $11}'>)} {(DQ ($ VSub_Number '$1'))}) (C {(grep)} {(-vE)} { (DQ ('(^') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (-) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (Lit_Other '$') ('|/www.') ($ VSub_Name '$host') ('|/') ($ VSub_Name '$host') (')') ) } ) (C {(sort)}) (C {(uniq)} {(-c)}) (C {(sort)} {(-rn)}) (C {(head)} {(-10)}) ] negated: F ) (C {(echo)} {(DQ )}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] )