(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:tidy_cmd)
          op: assign_op.Equal
          rhs: {(DQ <'perltidy -pt=2 -sbt=2 -bt=2 -nsfs -b -t -nola -ce -sbl -nbbc'>)}
          spids: [106]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:argv0)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {<basename>} {($ Id.VSub_Number '$0')})
              )
            }
          spids: [112]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:scripts_dir)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {<dirname>} {($ Id.VSub_Number '$0')})
              ) <'/scripts'>
            }
          spids: [121]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Number '$1'))} 
                  {<Id.Lit_Equals '='> <Id.Lit_Equals '='>} {(DQ <-h>)} {<Id.Lit_RBracket ']'>}
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [
            (C {<echo>} {(DQ ($ Id.VSub_DollarName '$argv0') <' [-h]'>)})
            (C {<echo>} 
              {(DQ <'   Run perltidy on all perl scripts and modules in the scripts directory'>)}
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [132 150]
        )
      ]
    )
    (C {<cd>} {($ Id.VSub_DollarName '$scripts_dir')})
    (command.ForEach
      iter_name: file
      iter_words: [{<Id.Lit_Star '*'> <.pl>}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {<echo>} 
              {
                (DQ <'tidy : '> ($ Id.VSub_DollarName '$scripts_dir') <'/'> 
                  ($ Id.VSub_DollarName '$file')
                )
              }
            )
            (C {($ Id.VSub_DollarName '$tidy_cmd')} {($ Id.VSub_DollarName '$file')})
          ]
        )
    )
    (command.ForEach
      iter_name: file
      iter_words: [{<Id.Lit_Star '*'> <.pm>}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {<echo>} 
              {
                (DQ <'tidy : '> ($ Id.VSub_DollarName '$scripts_dir') <'/'> 
                  ($ Id.VSub_DollarName '$file')
                )
              }
            )
            (C {($ Id.VSub_DollarName '$tidy_cmd')} {($ Id.VSub_DollarName '$file')})
          ]
        )
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)