(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:temp)
          op: assign_op.Equal
          rhs: 
            {
              (DQ (/tmp/) 
                (command_sub
                  left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:13)
                  command_list: 
                    (command.CommandList
                      children: [(C {(basename)} {($ Id.VSub_Number '$0')})]
                    )
                ) (.) ($ Id.VSub_Dollar '$$')
              )
            }
          spids: [10]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:htdocs)
          op: assign_op.Equal
          rhs: {(DQ (/usr/local/etc/httpd/htdocs/))}
          spids: [30]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:myhome)
          op: assign_op.Equal
          rhs: {(DQ (/usr/home/taylor/))}
          spids: [35]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:cgibin)
          op: assign_op.Equal
          rhs: {(DQ (/usr/local/etc/httpd/cgi-bin/))}
          spids: [40]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:sedstr)
          op: assign_op.Equal
          rhs: 
            {
              (DQ ('s/^/  /g;s|') ($ Id.VSub_DollarName '$htdocs') ('|[htdocs]  |;s|') 
                ($ Id.VSub_DollarName '$myhome') ('|[homedir] |;s|') ($ Id.VSub_DollarName '$cgibin') ('|[cgi-bin] |')
              )
            }
          spids: [46]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:screen)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (
'(File does not exist|Invalid error redirect|premature EOF|Premature end of script|script not found)'
                )
              )
            }
          spids: [58]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:length)
          op: assign_op.Equal
          rhs: {(5)}
          spids: [65]
        )
      ]
    )
    (command.ShFunction
      name: checkfor
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {(grep)} {(DQ (${ Id.VSub_Number 2) (':'))} {(DQ ($ Id.VSub_Number '$1'))})
                (C {(awk)} {(SQ (Token id:Id.Lit_Chars val:'{print $NF}' span_id:98))})
                (C {(sort)})
                (C {(uniq)} {(-c)})
                (C {(sort)} {(-rn)})
                (C {(head)} {(-) ($ Id.VSub_DollarName '$length')})
                (command.Simple
                  words: [{(sed)} {(DQ ($ Id.VSub_DollarName '$sedstr'))}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:133)
                      fd: -1
                      arg_word: {($ Id.VSub_DollarName '$temp')}
                    )
                  ]
                )
              ]
              negated: F
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} 
                          {
                            (command_sub
                              left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:143)
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (command.Simple
                                      words: [{(wc)} {(-l)}]
                                      redirects: [
                                        (redir.Redir
                                          op: (Token id:Id.Redir_Less val:'<' span_id:148)
                                          fd: -1
                                          arg_word: {($ Id.VSub_DollarName '$temp')}
                                        )
                                      ]
                                    )
                                  ]
                                )
                            )
                          } {(-gt)} {(0)} {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:159)
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ )})
                    (C {(echo)} {(DQ ($ Id.VSub_Number '$2') (' errors:'))})
                    (C {(cat)} {($ Id.VSub_DollarName '$temp')})
                  ]
                  spids: [139 161]
                )
              ]
            )
          ]
        )
    )
    (C {(trap)} 
      {
        (DQ 
          (command_sub
            left_token: (Token id:Id.Left_Backtick val:'`' span_id:191)
            command_list: (command.CommandList children:[(C {(which)} {(rm)})])
          ) (' -f ') ($ Id.VSub_DollarName '$temp')
        )
      } {(0)}
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_Number '$1'))} {(Id.Lit_Equals '=')} 
                  {(DQ (-l))} {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:221)
            )
          ]
          action: [
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:length)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_Number '$2')}
                      spids: [226]
                    )
                  ]
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:228)
            )
            (C {(shift)} {(2)})
          ]
          spids: [205 223]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {($ Id.VSub_Pound '$#')} {(-ne)} {(1)} {(-o)} {(Id.KW_Bang '!')} 
                  {(-r)} {(DQ ($ Id.VSub_Number '$1'))} {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:259)
            )
          ]
          action: [
            (command.Simple
              words: [
                {(echo)}
                {
                  (DQ ('Usage: ') 
                    (command_sub
                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:268)
                      command_list: 
                        (command.CommandList
                          children: [(C {(basename)} {($ Id.VSub_Number '$0')})]
                        )
                    ) (' [-l len] error_log')
                  )
                }
              ]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:276)
                  fd: -1
                  arg_word: {(2)}
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:280)
              arg_word: {(1)}
            )
          ]
          spids: [237 261]
        )
      ]
    )
    (C {(echo)} {(Input)} {(file)} {($ Id.VSub_Number '$1')} {(has)} 
      {
        (command_sub
          left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:297)
          command_list: 
            (command.CommandList
              children: [
                (command.Simple
                  words: [{(wc)} {(-l)}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Less val:'<' span_id:302)
                      fd: -1
                      arg_word: {(DQ ($ Id.VSub_Number '$1'))}
                    )
                  ]
                )
              ]
            )
        )
      } {(entries.)}
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:start)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:314)
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.Pipeline
                          children: [
                            (C {(grep)} {(-E)} 
                              {(SQ (Token id:Id.Lit_Chars val:'\\[.*:.*:.*\\]' span_id:320))} {(DQ ($ Id.VSub_Number '$1'))}
                            )
                            (C {(head)} {(-1)})
                            (C {(awk)} 
                              {
                                (SQ 
                                  (Token
                                    id: Id.Lit_Chars
                                    val: '{print $1" "$2" "$3" "$4" "$5 }'
                                    span_id: 338
                                  )
                                )
                              }
                            )
                          ]
                          negated: F
                        )
                      ]
                    )
                )
              )
            }
          spids: [312]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:end)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:345)
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.Pipeline
                          children: [
                            (C {(grep)} {(-E)} 
                              {(SQ (Token id:Id.Lit_Chars val:'\\[.*:.*:.*\\]' span_id:351))} {(DQ ($ Id.VSub_Number '$1'))}
                            )
                            (C {(tail)} {(-1)})
                            (C {(awk)} 
                              {
                                (SQ 
                                  (Token
                                    id: Id.Lit_Chars
                                    val: '{print $1" "$2" "$3" "$4" "$5 }'
                                    span_id: 369
                                  )
                                )
                              }
                            )
                          ]
                          negated: F
                        )
                      ]
                    )
                )
              )
            }
          spids: [343]
        )
      ]
    )
    (C {(/bin/echo)} {(-n)} 
      {(DQ ('Entries from ') ($ Id.VSub_DollarName '$start') (' to ') ($ Id.VSub_DollarName '$end'))}
    )
    (C {(echo)} {(DQ )})
    (C {(checkfor)} {(DQ ($ Id.VSub_Number '$1'))} {(DQ ('File does not exist'))})
    (C {(checkfor)} {(DQ ($ Id.VSub_Number '$1'))} {(DQ ('Invalid error redirection directive'))})
    (C {(checkfor)} {(DQ ($ Id.VSub_Number '$1'))} {(DQ ('premature EOF'))})
    (C {(checkfor)} {(DQ ($ Id.VSub_Number '$1'))} {(DQ ('script not found or unable to stat'))})
    (C {(checkfor)} {(DQ ($ Id.VSub_Number '$1'))} {(DQ ('Premature end of script headers'))})
    (command.Pipeline
      children: [
        (C {(grep)} {(-vE)} {(DQ ($ Id.VSub_DollarName '$screen'))} {(DQ ($ Id.VSub_Number '$1'))})
        (C {(grep)} {(DQ (Id.Lit_Other '\\') ('[error') (Id.Lit_Other '\\') (']'))})
        (C {(grep)} {(DQ (Id.Lit_Other '\\') ('[client '))})
        (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s/\\[error\\]/\\`/' span_id:488))})
        (C {(cut)} 
          {(-d) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\`' span_id:496))} {(-f2)}
        )
        (C {(cut)} 
          {(-d) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\ ' span_id:505))} {(-f4-)}
        )
        (C {(sort)})
        (C {(uniq)} {(-c)})
        (C {(sort)} {(-rn)})
        (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s/^/  /' span_id:531))})
        (command.Simple
          words: [{(head)} {(-) ($ Id.VSub_DollarName '$length')}]
          redirects: [
            (redir.Redir
              op: (Token id:Id.Redir_Great val:'>' span_id:541)
              fd: -1
              arg_word: {($ Id.VSub_DollarName '$temp')}
            )
          ]
        )
      ]
      negated: F
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} 
                  {
                    (command_sub
                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:550)
                      command_list: 
                        (command.CommandList
                          children: [
                            (command.Simple
                              words: [{(wc)} {(-l)}]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_Less val:'<' span_id:555)
                                  fd: -1
                                  arg_word: {($ Id.VSub_DollarName '$temp')}
                                )
                              ]
                            )
                          ]
                        )
                    )
                  } {(-gt)} {(0)} {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:566)
            )
          ]
          action: [
            (C {(echo)} {(DQ )})
            (C {(echo)} {(DQ ('Additional error messages in log file:'))})
            (C {(cat)} {($ Id.VSub_DollarName '$temp')})
          ]
          spids: [546 568]
        )
      ]
    )
    (C {(echo)} {(DQ )})
    (C {(echo)} {(DQ ('And non-error messages occurring in the log file:'))})
    (command.Pipeline
      children: [
        (C {(grep)} {(-vE)} {(DQ ($ Id.VSub_DollarName '$screen'))} {(DQ ($ Id.VSub_Number '$1'))})
        (C {(grep)} {(-v)} {(DQ (Id.Lit_Other '\\') ('[error') (Id.Lit_Other '\\') (']'))})
        (C {(sort)})
        (C {(uniq)} {(-c)})
        (C {(sort)} {(-rn)})
        (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s/^/  /' span_id:653))})
        (C {(head)} {(-) ($ Id.VSub_DollarName '$length')})
      ]
      negated: F
    )
    (command.ControlFlow token:(Token id:Id.ControlFlow_Exit val:exit span_id:664) arg_word:{(0)})
  ]
)