(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:awkscript)
          op: assign_op.Equal
          rhs: {(DQ (/tmp/randomquote.awk.) ($ Id.VSub_Dollar '$$'))}
          spids: [14]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {($ Id.VSub_Pound '$#')} {(-ne)} {(1)} {(Id.Lit_RBracket ']')})
              terminator: (Token id:Id.Op_Semi val:';' span_id:33)
            )
          ]
          action: [
            (command.Simple
              words: [{(echo)} {(DQ ('Usage: randomquote datafilename'))}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:44)
                  fd: -1
                  arg_word: {(2)}
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:48)
              arg_word: {(1)}
            )
          ]
          spids: [21 35]
        )
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-r)} {(DQ ($ Id.VSub_Number '$1'))} 
                  {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:66)
            )
          ]
          action: [
            (command.Simple
              words: [
                {(echo)}
                {(DQ ('Error: quote file ') ($ Id.VSub_Number '$1') (' is missing or not readable'))}
              ]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:79)
                  fd: -1
                  arg_word: {(2)}
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:83)
              arg_word: {(1)}
            )
          ]
          spids: [52 68]
        )
      ]
    )
    (C {(trap)} 
      {
        (DQ 
          (command_sub
            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:93)
            command_list: (command.CommandList children:[(C {(which)} {(rm)})])
          ) (' -f ') ($ Id.VSub_DollarName '$awkscript')
        )
      } {(0)}
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:107)
          fd: -1
          here_begin: {(DQ (EOF))}
          here_end_span_id: 121
          stdin_parts: [
            ('BEGIN { srand() }\n')
            ('      { s[NR] = $0 } \n')
            ('END   { print s[randint(NR)] } \n')
            ('function randint(n) { return int (n * rand() ) + 1 }\n')
          ]
        )
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:113)
          fd: -1
          arg_word: {($ Id.VSub_DollarName '$awkscript')}
        )
      ]
    )
    (command.Simple
      words: [{(awk)} {(-f)} {($ Id.VSub_DollarName '$awkscript')}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Less val:'<' span_id:129)
          fd: -1
          arg_word: {(DQ ($ Id.VSub_Number '$1'))}
        )
      ]
    )
    (command.ControlFlow token:(Token id:Id.ControlFlow_Exit val:exit span_id:136) arg_word:{(0)})
  ]
)