(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair lhs:(LhsName name:Z) op:Equal rhs:{(DQ (compress))} spids:[17])
        (assign_pair lhs:(LhsName name:gz) op:Equal rhs:{(DQ (gzip))} spids:[22])
        (assign_pair lhs:(LhsName name:bz) op:Equal rhs:{(DQ (bzip2))} spids:[27])
      ]
      spids: [17]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:Zout)
          op: Equal
          rhs: {(DQ (/tmp/bestcompress.) ($ VSub_Dollar '$$') (.Z))}
          spids: [32]
        )
      ]
      spids: [32]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:gzout)
          op: Equal
          rhs: {(DQ (/tmp/bestcompress.) ($ VSub_Dollar '$$') (.gz))}
          spids: [39]
        )
      ]
      spids: [39]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:bzout)
          op: Equal
          rhs: {(DQ (/tmp/bestcompress.) ($ VSub_Dollar '$$') (.bz))}
          spids: [46]
        )
      ]
      spids: [46]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:skipcompressed) op:Equal rhs:{(1)} spids:[53])]
      spids: [53]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (-a))} 
                  {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Sentence
              child: 
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:skipcompressed)
                      op: Equal
                      rhs: {(0)}
                      spids: [78]
                    )
                  ]
                  spids: [78]
                )
              terminator: <Op_Semi ';'>
            )
            (C {(shift)})
          ]
          spids: [16777215 75]
        )
      ]
      spids: [16777215 85]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-eq)} {(0)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Sentence
              child: 
                (SimpleCommand
                  words: [
                    {(echo)}
                    {
                      (DQ ('Usage: ') ($ VSub_Number '$0') 
                        (' [-a] file or files to optimally compress')
                      )
                    }
                  ]
                  redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                )
              terminator: <Op_Semi ';'>
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 101]
        )
      ]
      spids: [16777215 120]
    )
    (C {(trap)} 
      {
        (DQ ('/bin/rm -f ') ($ VSub_Name '$Zout') (' ') ($ VSub_Name '$gzout') (' ') 
          ($ VSub_Name '$bzout')
        )
      } {(EXIT)}
    )
    (ForEach
      iter_name: name
      iter_words: [{(DQ ($ VSub_At '$@'))}]
      do_arg_iter: F
      body: 
        (DoGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Name '$name'))} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ($ VSub_Number '$0') (': file ') ($ VSub_Name '$name') 
                            (' not found. Skipped.')
                          )
                        }
                      ]
                      redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                    )
                    (ControlFlow token:<ControlFlow_Continue continue>)
                  ]
                  spids: [16777215 167]
                )
              ]
              spids: [16777215 187]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} 
                          {
                            (DQ 
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [
                                      (Pipeline
                                        children: [
                                          (C {(echo)} {($ VSub_Name '$name')})
                                          (C {(egrep)} {(SQ <'(\\.Z$|\\.gz$|\\.bz2$)'>)})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [196 208]
                              )
                            )
                          } {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (C {(Lit_Other '[')} {($ VSub_Name '$skipcompressed')} {(-eq)} {(1)} 
                                  {(Lit_Other ']')}
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(echo)} 
                              {
                                (DQ ('Skipped file ') (${ VSub_Name name) 
                                  (": It's already compressed.")
                                )
                              }
                            )
                            (ControlFlow
                              token: <ControlFlow_Continue continue>
                            )
                          ]
                          spids: [16777215 238]
                        )
                      ]
                      else_action: [
                        (C {(echo)} {(DQ ('Warning: Trying to double-compress ') ($ VSub_Name '$name'))})
                      ]
                      spids: [256 268]
                    )
                  ]
                  spids: [16777215 221]
                )
              ]
              spids: [16777215 271]
            )
            (Sentence
              child: 
                (SimpleCommand
                  words: [{($ VSub_Name '$Z')}]
                  redirects: [
                    (Redir
                      op: <Redir_Less '<'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_Name '$name'))}
                    )
                    (Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {($ VSub_Name '$Zout')}
                    )
                  ]
                )
              terminator: <Op_Amp '&'>
            )
            (Sentence
              child: 
                (SimpleCommand
                  words: [{($ VSub_Name '$gz')}]
                  redirects: [
                    (Redir
                      op: <Redir_Less '<'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_Name '$name'))}
                    )
                    (Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {($ VSub_Name '$gzout')}
                    )
                  ]
                )
              terminator: <Op_Amp '&'>
            )
            (Sentence
              child: 
                (SimpleCommand
                  words: [{($ VSub_Name '$bz')}]
                  redirects: [
                    (Redir
                      op: <Redir_Less '<'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_Name '$name'))}
                    )
                    (Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {($ VSub_Name '$bzout')}
                    )
                  ]
                )
              terminator: <Op_Amp '&'>
            )
            (C {(wait)})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:smallest)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (Pipeline
                                  children: [
                                    (C {(ls)} {(-l)} {(DQ ($ VSub_Name '$name'))} {($ VSub_Name '$Zout')} 
                                      {($ VSub_Name '$gzout')} {($ VSub_Name '$bzout')}
                                    )
                                    (C {(awk)} {(SQ <'{print $5"="NR}'>)})
                                    (C {(sort)} {(-n)})
                                    (C {(cut)} {(-d) (Lit_Other '=')} {(-f2)})
                                    (C {(head)} {(-1)})
                                  ]
                                  negated: F
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [337 382]
                        )
                      )
                    }
                  spids: [335]
                )
              ]
              spids: [335]
            )
            (Case
              to_match: {(DQ ($ VSub_Name '$smallest'))}
              arms: [
                (case_arm
                  pat_list: [{(1)}]
                  action: [
                    (C {(echo)} 
                      {
                        (DQ ('No space savings by compressing ') ($ VSub_Name '$name') 
                          ('. Left as is.')
                        )
                      }
                    )
                  ]
                  spids: [396 398 409 16777215]
                )
                (case_arm
                  pat_list: [{(2)}]
                  action: [
                    (C {(echo)} {(Best)} {(compression)} {(is)} {(with)} {(compress.)} {(File)} {(renamed)} 
                      {(${ VSub_Name name) (.Z)}
                    )
                    (Sentence
                      child: (C {(mv)} {($ VSub_Name '$Zout')} {(DQ (${ VSub_Name name) (.Z))})
                      terminator: <Op_Semi ';'>
                    )
                    (C {(rm)} {(-f)} {(DQ ($ VSub_Name '$name'))})
                  ]
                  spids: [412 414 460 16777215]
                )
                (case_arm
                  pat_list: [{(3)}]
                  action: [
                    (C {(echo)} {(Best)} {(compression)} {(is)} {(with)} {(gzip.)} {(File)} {(renamed)} 
                      {(${ VSub_Name name) (.gz)}
                    )
                    (Sentence
                      child: (C {(mv)} {($ VSub_Name '$gzout')} {(DQ (${ VSub_Name name) (.gz))})
                      terminator: <Op_Semi ';'>
                    )
                    (C {(rm)} {(-f)} {(DQ ($ VSub_Name '$name'))})
                  ]
                  spids: [463 465 511 16777215]
                )
                (case_arm
                  pat_list: [{(4)}]
                  action: [
                    (C {(echo)} {(Best)} {(compression)} {(is)} {(with)} {(bzip2.)} {(File)} {(renamed)} 
                      {(${ VSub_Name name) (.bz2)}
                    )
                    (Sentence
                      child: (C {(mv)} {($ VSub_Name '$bzout')} {(DQ (${ VSub_Name name) (.bz2))})
                      terminator: <Op_Semi ';'>
                    )
                    (C {(rm)} {(-f)} {(DQ ($ VSub_Name '$name'))})
                  ]
                  spids: [514 516 16777215 562]
                )
              ]
              spids: [387 393 562]
            )
          ]
          spids: [147 565]
        )
      spids: [142 16777215]
    )
    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
  ]
)