(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:awkscript)
          op: Equal
          rhs: {(DQ (/tmp/randomquote.awk.) ($ VSub_Dollar '$$'))}
          spids: [14]
        )
      ]
      spids: [14]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-ne)} {(1)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('Usage: randomquote datafilename'))}]
              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 35]
        )
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(KW_Bang '!')} {(-r)} {(DQ ($ VSub_Number '$1'))} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [
                {(echo)}
                {(DQ ('Error: quote file ') ($ VSub_Number '$1') (' is missing or not readable'))}
              ]
              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [52 68]
        )
      ]
      spids: [16777215 87]
    )
    (C {(trap)} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(which)} {(rm)})])
            left_token: <Left_CommandSub '$('>
            spids: [93 97]
          ) (' -f ') ($ VSub_Name '$awkscript')
        )
      } {(0)}
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          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 op:<Redir_Great '>'> fd:16777215 arg_word:{($ VSub_Name '$awkscript')})
      ]
    )
    (SimpleCommand
      words: [{(awk)} {(-f)} {($ VSub_Name '$awkscript')}]
      redirects: [(Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(DQ ($ VSub_Number '$1'))})]
    )
    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
  ]
)