(command.CommandList children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {($ Id.VSub_Pound '$#')} {(-eq)} {(0)} {(Id.Lit_RBracket ']')}) terminator: (Token id:Id.Op_Semi val:';' span_id:32) ) ] action: [ (command.Simple words: [{(echo)} {(DQ ('Usage: ') ($ Id.VSub_Number '$0') (' [-d|-i|-x] url'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:45) fd: -1 arg_word: {(2)} ) ] ) (command.Simple words: [{(echo)} {(DQ ('-d=domains only, -i=internal refs only, -x=external only'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:55) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:59) arg_word: {(1)} ) ] spids: [20 34] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {($ Id.VSub_Pound '$#')} {(-gt)} {(1)} {(Id.Lit_RBracket ']')}) terminator: (Token id:Id.Op_Semi val:';' span_id:78) ) ] action: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(-d)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lastcmd) op: assign_op.Equal rhs: {(DQ ('cut -d/ -f3 | sort | uniq'))} spids: [95] ) ] ) (C {(shift)}) ] spids: [92 93 104 -1] ) (case_arm pat_list: [{(-r)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:basedomain) op: assign_op.Equal rhs: { (DQ ('http://') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:113) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_Number '$2')}) (C {(cut)} {(-d/)} {(-f3)}) ] negated: F ) ] ) ) (/) ) } spids: [110] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lastcmd) op: assign_op.Equal rhs: { (DQ ('grep ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:133) ) ('^') ($ Id.VSub_DollarName '$basedomain') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:136) ) (' | sed ') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:138)) ('s|') ($ Id.VSub_DollarName '$basedomain') ('||g') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:142)) (' | sort |') ('\t uniq') ) } spids: [130] ) ] ) (C {(shift)}) ] spids: [107 108 152 -1] ) (case_arm pat_list: [{(-a)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:basedomain) op: assign_op.Equal rhs: { (DQ ('http://') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:161) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_Number '$2')}) (C {(cut)} {(-d/)} {(-f3)}) ] negated: F ) ] ) ) (/) ) } spids: [158] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lastcmd) op: assign_op.Equal rhs: { (DQ ('grep -v ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:181) ) ('^') ($ Id.VSub_DollarName '$basedomain') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:184) ) (' | sort | uniq') ) } spids: [178] ) ] ) (C {(shift)}) ] spids: [155 156 192 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.Sentence child: (command.Simple words: [ {(echo)} { (DQ ($ Id.VSub_Number '$0') (': unknown option specified: ') ($ Id.VSub_Number '$1') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:206) fd: -1 arg_word: {(2)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:208) ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:210) arg_word: {(1)} ) ] spids: [195 196 -1 215] ) ] ) ] spids: [66 80] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lastcmd) op: assign_op.Equal rhs: {(DQ ('sort | uniq'))} spids: [220] ) ] ) ] ) (command.Pipeline children: [ (C {(lynx)} {(-dump)} {(DQ ($ Id.VSub_Number '$1'))}) (C {(sed)} {(-n)} {(SQ (Token id:Id.Lit_Chars val:'/^References$/,$p' span_id:244))}) (C {(grep)} {(-E)} {(SQ (Token id:Id.Lit_Chars val:'[[:digit:]]+\\.' span_id:256))}) (C {(awk)} {(SQ (Token id:Id.Lit_Chars val:'{print $2}' span_id:266))}) (C {(cut)} {(-d) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\?' span_id:276))} {(-f1)} ) (C {(eval)} {($ Id.VSub_DollarName '$lastcmd')}) ] negated: F ) (command.ControlFlow token:(Token id:Id.ControlFlow_Exit val:exit span_id:288) arg_word:{(0)}) ] )