(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: {(DQ ('http://www.bennetyee.org/ucsd-pages/area.html'))} spids: [11] ) ] spids: [11] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Number '$1'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (C {(echo)} {(DQ ('usage: areacode <three-digit US telephone area code>'))}) terminator: <Op_Semi ';'> ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 31] ) ] spids: [16777215 45] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(echo)} {($ VSub_Number '$1')}) (C {(wc)} {(-c)})] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [56 66] ) ) } {(-ne)} {(4)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (C {(echo)} {(DQ ('areacode: wrong length: only works with three-digit US area codes'))}) terminator: <Op_Semi ';'> ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 77] ) ] spids: [16777215 91] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Number '$1')}) (C {(sed)} {(SQ <'s/[[:digit:]]//g'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [106 118] ) ) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (C {(echo)} {(DQ ('areacode: not-digits: area codes can only be made up of digits'))}) terminator: <Op_Semi ';'> ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 125] ) ] spids: [16777215 139] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:result) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(curl)} {(-s)} {(-dump)} {($ VSub_Name '$source')}) (C {(grep)} { (DQ ('name=') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ($ VSub_Number '$1') ) } ) (C {(sed)} {(SQ <'s/<[^>]*>//g;s/^ //g'>)}) (C {(cut)} {(-f2-)} {(-d) (EscapedLiteralPart token:<Lit_EscapedChar '\\ '>)}) (C {(cut)} {(-f1)} {(-d) (EscapedLiteralPart token:<Lit_EscapedChar '\\('>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [148 196] ) ) } spids: [146] ) ] spids: [146] ) (C {(echo)} {(DQ ('Area code ') ($ VSub_Number '$1') (' =') ($ VSub_Name '$result'))}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] )