(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike 'convargs='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'convargs='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'convargs='> name:convargs)
          op: assign_op.Equal
          rhs: {(DQ <'-unsharp 0x.5 -resize'>)}
        )
      ]
      redirects: []
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (command.ShAssignment
              left: <Id.Lit_VarLike 'count='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'count='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count)
                  op: assign_op.Equal
                  rhs: {<0>}
                )
              ]
              redirects: []
            )
          terminator: <Id.Op_Semi _>
        )
        (command.Sentence
          child: 
            (command.ShAssignment
              left: <Id.Lit_VarLike 'exact='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'exact='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'exact='> name:exact)
                  op: assign_op.Equal
                  rhs: {(DQ )}
                )
              ]
              redirects: []
            )
          terminator: <Id.Op_Semi _>
        )
        (command.ShAssignment
          left: <Id.Lit_VarLike 'fit='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike 'fit='>
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'fit='> name:fit)
              op: assign_op.Equal
              rhs: {(DQ )}
            )
          ]
          redirects: []
        )
      ]
    )
    (command.ShFunction
      name_tok: <usage>
      name: usage
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [
                {<echo>}
                {
                  (DQ <'Usage: '> 
                    (CommandSub
                      left_token: <Id.Left_DollarParen '$('>
                      child: 
                        (command.Simple
                          blame_tok: <basename>
                          more_env: []
                          words: [{<basename>} {($ Id.VSub_Number 0)}]
                          redirects: []
                          do_fork: T
                        )
                      right: <Id.Eof_RParen _>
                    ) <' (-e|-f) thumbnail-size image [image] [image]'>
                  )
                }
              ]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'-e  resize to exact dimensions, ignoring original proportions'>)}]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'-f  fit image into specified dimensions, retaiing proportion'>)}]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'-s  strip EXIF information (make ready for Web use)'>)}]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'    please use WIDTHxHEIGHT for requested size (e.g., 100x100)'>)}]
              redirects: []
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {($ Id.VSub_Pound '#')}
                        {<-eq>}
                        {<0>}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <usage>
              more_env: []
              words: [{<usage>}]
              redirects: []
              do_fork: T
            )
          ]
          spids: [104 118]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <getopts>
                  more_env: []
                  words: [{<getopts>} {(DQ <'e:f:s'>)} {<opt>}]
                  redirects: []
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Case
              case_kw: <Id.KW_Case case>
              to_match: (case_arg.Word w:{($ Id.VSub_DollarName opt)})
              arms_start: <Id.KW_In in>
              arms: [
                (CaseArm
                  left: <e>
                  pattern: (pat.Words words:[{<e>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Sentence
                      child: 
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'exact='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'exact='>
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'exact='> name:exact)
                              op: assign_op.Equal
                              rhs: {(DQ ($ Id.VSub_DollarName OPTARG))}
                            )
                          ]
                          redirects: []
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <f>
                  pattern: (pat.Words words:[{<f>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Sentence
                      child: 
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'fit='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'fit='>
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'fit='> name:fit)
                              op: assign_op.Equal
                              rhs: {(DQ ($ Id.VSub_DollarName OPTARG))}
                            )
                          ]
                          redirects: []
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <s>
                  pattern: (pat.Words words:[{<s>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Sentence
                      child: 
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'strip='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'strip='>
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'strip='> name:strip)
                              op: assign_op.Equal
                              rhs: {(DQ <-strip>)}
                            )
                          ]
                          redirects: []
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <Id.Lit_QMark '?'>
                  pattern: (pat.Words words:[{<Id.Lit_QMark '?'>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Sentence
                      child: 
                        (command.Simple
                          blame_tok: <usage>
                          more_env: []
                          words: [{<usage>}]
                          redirects: []
                          do_fork: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
              ]
              arms_end: <Id.KW_Esac esac>
              redirects: []
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: []
    )
    (command.Simple
      blame_tok: <shift>
      more_env: []
      words: [
        {<shift>}
        {
          (word_part.ArithSub
            left: <Id.Left_DollarDParen '$(('>
            anode: 
              (arith_expr.Binary
                op_id: Id.Arith_Minus
                left: {($ Id.VSub_DollarName OPTIND)}
                right: {<Id.Lit_Digits 1>}
              )
            right: <Id.Right_DollarDParen _>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'rwidth='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'rwidth='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rwidth='> name:rwidth)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (CommandSub
                  left_token: <Id.Left_DollarParen '$('>
                  child: 
                    (command.Pipeline
                      children: [
                        (command.Simple
                          blame_tok: <echo>
                          more_env: []
                          words: [{<echo>} {($ Id.VSub_DollarName exact)} {($ Id.VSub_DollarName fit)}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <cut>
                          more_env: []
                          words: [{<cut>} {<-dx>} {<-f1>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_Pipe _>]
                    )
                  right: <Id.Eof_RParen _>
                )
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'rheight='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'rheight='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rheight='> name:rheight)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (CommandSub
                  left_token: <Id.Left_DollarParen '$('>
                  child: 
                    (command.Pipeline
                      children: [
                        (command.Simple
                          blame_tok: <echo>
                          more_env: []
                          words: [{<echo>} {($ Id.VSub_DollarName exact)} {($ Id.VSub_DollarName fit)}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <cut>
                          more_env: []
                          words: [{<cut>} {<-dx>} {<-f2>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_Pipe _>]
                    )
                  right: <Id.Eof_RParen _>
                )
              )
            }
        )
      ]
      redirects: []
    )
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [image]
      iterable: (for_iter__Args)
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'width='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'width='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'width='> name:width)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSub
                          left_token: <Id.Left_DollarParen '$('>
                          child: 
                            (command.Simple
                              blame_tok: <identify>
                              more_env: []
                              words: [
                                {<identify>}
                                {<-format>}
                                {(DQ <'%w'>)}
                                {(DQ ($ Id.VSub_DollarName image))}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          right: <Id.Eof_RParen _>
                        )
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'height='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'height='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'height='> name:height)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSub
                          left_token: <Id.Left_DollarParen '$('>
                          child: 
                            (command.Simple
                              blame_tok: <identify>
                              more_env: []
                              words: [
                                {<identify>}
                                {<-format>}
                                {(DQ <'%h'>)}
                                {(DQ ($ Id.VSub_DollarName image))}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          right: <Id.Eof_RParen _>
                        )
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <Id.Lit_LBracket '['>
                              more_env: []
                              words: [
                                {<Id.Lit_LBracket '['>}
                                {($ Id.VSub_DollarName width)}
                                {<-le>}
                                {($ Id.VSub_DollarName rwidth)}
                                {<-a>}
                                {($ Id.VSub_DollarName height)}
                                {<-le>}
                                {($ Id.VSub_DollarName rheight)}
                                {<Id.Lit_RBracket ']'>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [
                        {<echo>}
                        {
                          (DQ <'Image '> ($ Id.VSub_DollarName image) 
                            <' is already smaller than reqeusted dimensions. Skipped.'>
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [309 331]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'suffix='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'suffix='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'suffix='> name:suffix)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (DQ 
                            (CommandSub
                              left_token: <Id.Left_DollarParen '$('>
                              child: 
                                (command.Pipeline
                                  children: [
                                    (command.Simple
                                      blame_tok: <echo>
                                      more_env: []
                                      words: [{<echo>} {($ Id.VSub_DollarName image)}]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <rev>
                                      more_env: []
                                      words: [{<rev>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <cut>
                                      more_env: []
                                      words: [{<cut>} {<-d.>} {<-f1>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <rev>
                                      more_env: []
                                      words: [{<rev>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  ops: [<Id.Op_Pipe _> <Id.Op_Pipe _> <Id.Op_Pipe _>]
                                )
                              right: <Id.Eof_RParen _>
                            )
                          )
                        }
                    )
                  ]
                  redirects: []
                )
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'prefix='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'prefix='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prefix='> name:prefix)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (DQ 
                            (CommandSub
                              left_token: <Id.Left_DollarParen '$('>
                              child: 
                                (command.Pipeline
                                  children: [
                                    (command.Simple
                                      blame_tok: <echo>
                                      more_env: []
                                      words: [{<echo>} {($ Id.VSub_DollarName image)}]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <rev>
                                      more_env: []
                                      words: [{<rev>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <cut>
                                      more_env: []
                                      words: [{<cut>} {<-d.>} {<-f2->}]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <rev>
                                      more_env: []
                                      words: [{<rev>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  ops: [<Id.Op_Pipe _> <Id.Op_Pipe _> <Id.Op_Pipe _>]
                                )
                              right: <Id.Eof_RParen _>
                            )
                          )
                        }
                    )
                  ]
                  redirects: []
                )
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'newname='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'newname='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'newname='> name:newname)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_DollarName prefix) <-thumb.> ($ Id.VSub_DollarName suffix))}
                    )
                  ]
                  redirects: []
                )
                (command.If
                  if_kw: <Id.KW_If if>
                  arms: [
                    (IfArm
                      keyword: <Id.KW_If if>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.Simple
                                  blame_tok: <Id.Lit_LBracket '['>
                                  more_env: []
                                  words: [
                                    {<Id.Lit_LBracket '['>}
                                    {<-z>}
                                    {(DQ ($ Id.VSub_DollarName fit))}
                                    {<Id.Lit_RBracket ']'>}
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      then_kw: <Id.KW_Then then>
                      action: [
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'size='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'size='>
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'size='> name:size)
                              op: assign_op.Equal
                              rhs: {(DQ ($ Id.VSub_DollarName exact) <'!'>)}
                            )
                          ]
                          redirects: []
                        )
                        (command.Simple
                          blame_tok: <echo>
                          more_env: []
                          words: [
                            {<echo>}
                            {
                              (DQ <'Creating '> (${ Id.VSub_Name rwidth) <x> (${ Id.VSub_Name rheight) 
                                <' (exact size) thumbnail for file '> ($ Id.VSub_DollarName image)
                              )
                            }
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      spids: [418 432]
                    )
                  ]
                  else_kw: <Id.KW_Else else>
                  else_action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'size='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'size='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'size='> name:size)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName fit))}
                        )
                      ]
                      redirects: []
                    )
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [
                        {<echo>}
                        {
                          (DQ <'Creating '> (${ Id.VSub_Name rwidth) <x> (${ Id.VSub_Name rheight) 
                            <' (max dimensions) thumbnail for file '> ($ Id.VSub_DollarName image)
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  fi_kw: <Id.KW_Fi fi>
                  redirects: []
                )
                (command.Simple
                  blame_tok: <convert>
                  more_env: []
                  words: [
                    {<convert>}
                    {(DQ ($ Id.VSub_DollarName image))}
                    {($ Id.VSub_DollarName strip)}
                    {($ Id.VSub_DollarName convargs)}
                    {(DQ ($ Id.VSub_DollarName size))}
                    {(DQ ($ Id.VSub_DollarName newname))}
                  ]
                  redirects: []
                  do_fork: T
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'count='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'count='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (word_part.ArithSub
                        left: <Id.Left_DollarDParen '$(('>
                        anode: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Plus
                            left: {($ Id.VSub_DollarName count)}
                            right: {<Id.Lit_Digits 1>}
                          )
                        right: <Id.Right_DollarDParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {($ Id.VSub_DollarName count)}
                        {<-eq>}
                        {<0>}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'Warning: no images found to process.'>)}]
              redirects: []
              do_fork: T
            )
          ]
          spids: [524 538]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)