(command.CommandList
  children: [
    (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: '> ($ Id.VSub_Number '$0') <' [-d|-i|-x] url'>)}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {(DQ <'-d=domains only, -i=internal refs only, -x=external only'>)}]
              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: [20 34]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-gt>} {<1>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          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: <Id.Left_DollarParen '$('>
                                  child: 
                                    (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:<Id.Lit_EscapedChar '\\"'>) 
                                <'^'> ($ Id.VSub_DollarName '$basedomain') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                                <' | sed '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <'s|'> ($ Id.VSub_DollarName '$basedomain') 
                                <'||g'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <' | 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: <Id.Left_DollarParen '$('>
                                  child: 
                                    (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: <Id.Lit_EscapedChar '\\"'>
                                ) <'^'> ($ Id.VSub_DollarName '$basedomain') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                                <' | 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
                              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: [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 <'/^References$/,$p'>)})
        (C {<grep>} {<-E>} {(SQ <'[[:digit:]]+\\.'>)})
        (C {<awk>} {(SQ <'{print $2}'>)})
        (C {<cut>} {<-d> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\?'>)} {<-f1>})
        (C {<eval>} {($ Id.VSub_DollarName '$lastcmd')})
      ]
      negated: F
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)