(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:titleurl)
          op: Equal
          rhs: {(DQ ('http://www.imdb.com/title/tt'))}
          spids: [13]
        )
      ]
      spids: [13]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:imdburl)
          op: Equal
          rhs: {(DQ ('http://www.imdb.com/find?s=tt&exact=true&ref_=fn_tt_ex&q='))}
          spids: [18]
        )
      ]
      spids: [18]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:tempout)
          op: Equal
          rhs: {(DQ (/tmp/moviedata.) ($ VSub_Dollar '$$'))}
          spids: [23]
        )
      ]
      spids: [23]
    )
    (FuncDef
      name: summarize_film
      body: 
        (BraceGroup
          children: [
            (Pipeline
              children: [
                (C {(grep)} {(DQ ('<title>'))} {($ VSub_Name '$tempout')})
                (C {(sed)} {(SQ <'s/<[^>]*>//g;s/(more)//'>)})
              ]
              negated: F
            )
            (Pipeline
              children: [
                (C {(grep)} {(--color) (Lit_Other '=') (never)} {(-A2)} {(SQ <'<h5>Plot:'>)} 
                  {($ VSub_Name '$tempout')}
                )
                (C {(tail)} {(-1)})
                (C {(cut)} {(-d) (EscapedLiteralPart token:<Lit_EscapedChar '\\<'>)} {(-f1)})
                (C {(fmt)})
                (C {(sed)} {(SQ <'s/^/    /'>)})
              ]
              negated: F
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
          ]
          spids: [34]
        )
      spids: [30 33]
    )
    (C {(trap)} {(DQ ('rm -f ') ($ VSub_Name '$tempout'))} {(0)} {(1)} {(15)})
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-eq)} {(0)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('Usage: ') ($ VSub_Number '$0') (' {movie title | movie ID}'))}]
              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 140]
        )
      ]
      spids: [16777215 159]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:nodigits)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [
                            (C {(echo)} {($ VSub_Number '$1')})
                            (C {(sed)} {(SQ <'s/[[:digit:]]*//g'>)})
                          ]
                          negated: F
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [171 183]
                )
              )
            }
          spids: [169]
        )
      ]
      spids: [169]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-eq)} {(1)} {(-a)} {(-z)} 
                  {(DQ ($ VSub_Name '$nodigits'))} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [
                {(lynx)}
                {(-source)}
                {(DQ ($ VSub_Name '$titleurl') ($ VSub_Number '$1') (/combined))}
              ]
              redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{($ VSub_Name '$tempout')})]
            )
            (C {(summarize_film)})
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
          ]
          spids: [16777215 209]
        )
      ]
      spids: [16777215 234]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:fixedname)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [(C {(echo)} {($ VSub_At '$@')}) (C {(tr)} {(SQ <' '>)} {(SQ <'+'>)})]
                          negated: F
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [246 262]
                )
              )
            }
          spids: [244]
        )
      ]
      spids: [244]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:url)
          op: Equal
          rhs: {(DQ ($ VSub_Name '$imdburl') ($ VSub_Name '$fixedname'))}
          spids: [269]
        )
      ]
      spids: [269]
    )
    (SimpleCommand
      words: [{(lynx)} {(-source)} {($ VSub_Name '$imdburl') ($ VSub_Name '$fixedname')}]
      redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{($ VSub_Name '$tempout')})]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:fail)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (C {(grep)} {(--color) (Lit_Other '=') (never)} 
                          {(SQ <'<h1 class="findHeader">No '>)} {($ VSub_Name '$tempout')}
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [294 306]
                )
              )
            }
          spids: [292]
        )
      ]
      spids: [292]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$fail'))} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('Failed: no results found for ') ($ VSub_Number '$1'))})
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 330]
        )
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} 
                  {
                    (DQ 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (C {(grep)} {(SQ <'<h1 class="findHeader">Displaying'>)} 
                                {($ VSub_Name '$tempout')}
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [354 362]
                      )
                    )
                  } {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Pipeline
              children: [
                (C {(grep)} {(--color) (Lit_Other '=') (never)} {(SQ </title/tt>)} 
                  {($ VSub_Name '$tempout')}
                )
                (C {(sed)} {(SQ <'s/</\\\n'> <'</g'>)})
                (C {(grep)} {(-vE)} {(SQ <'(.png|.jpg|>[ ]*$)'>)})
                (C {(grep)} {(-A)} {(1)} {(DQ ('a href='))})
                (C {(grep)} {(-v)} {(SQ <'^--$'>)})
                (C {(sed)} {(SQ <'s/<a href="\\/title\\/tt//g;s/<\\/a> //'>)})
                (C {(awk)} {(SQ <'(NR % 2 == 1) { title=$0 } (NR % 2 == 0) { print title " " $0 }'>)})
                (C {(sed)} {(SQ <'s/\\/.*>/: /'>)})
                (C {(sort)})
              ]
              negated: F
            )
          ]
          spids: [345 369]
        )
      ]
      spids: [16777215 469]
    )
    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
  ]
)