(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike 'command='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'command='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'command='> name:command)
          op: assign_op.Equal
          rhs: {<delta2patch>}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'USAGE='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'USAGE='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'USAGE='> name:USAGE)
          op: assign_op.Equal
          rhs: 
            {
              (SingleQuoted
                left: <Id.Left_DollarSingleQuote '$\''>
                tokens: [
                  <Id.Char_Literals '\n'>
                  <Id.Char_Literals '[-?\n'>
                  <Id.Char_Literals '@(#)$Id: delta2patch (AT&T Research) 2007-12-11 $\n'>
                  <Id.Char_Literals ']\n'>
                ]
                right: <Id.Right_SingleQuote '\''>
              ) ($ Id.VSub_DollarName USAGE_LICENSE) 
              (SingleQuoted
                left: <Id.Left_DollarSingleQuote '$\''>
                tokens: [
                  <Id.Char_Literals '\n'>
                  <Id.Char_Literals 
'[+NAME?delta2patch - generate patch script from pax delta+base archives]\n'
                  >
                  <Id.Char_Literals '[+DESCRIPTION?'>
                  <Id.Char_OneChar '\\b'>
                  <Id.Char_Literals delta2patch>
                  <Id.Char_OneChar '\\b'>
                  <Id.Char_Literals ' generates a '>
                  <Id.Char_OneChar '\\b'>
                  <Id.Char_Literals patch>
                  <Id.Char_OneChar '\\b'>
                  <Id.Char_Literals '(1) '>
                  <Id.Char_OneChar '\\a'>
                  <Id.Char_Literals 'diff -u'>
                  <Id.Char_OneChar '\\a'>
                  <Id.Char_Literals ' script\n'>
                  <Id.Char_Literals '\tgiven a '>
                  <Id.Char_OneChar '\\b'>
                  <Id.Char_Literals pax>
                  <Id.Char_OneChar '\\b'>
                  <Id.Char_Literals '(1) delta and base source archive to convert\n'>
                  <Id.Char_Literals 
'\tfiles extracted from the base archive to be equivalent to files\n'
                  >
                  <Id.Char_Literals 
'\textracted from the delta archive with respect to the base archive.]\n'
                  >
                  <Id.Char_Literals '\n'>
                  <Id.Char_Literals 'delta base\n'>
                  <Id.Char_Literals '\n'>
                  <Id.Char_Literals '[+SEE ALSO?'>
                  <Id.Char_OneChar '\\b'>
                  <Id.Char_Literals package>
                  <Id.Char_OneChar '\\b'>
                  <Id.Char_Literals '(1), '>
                  <Id.Char_OneChar '\\b'>
                  <Id.Char_Literals pax>
                  <Id.Char_OneChar '\\b'>
                  <Id.Char_Literals '(1)]\n'>
                ]
                right: <Id.Right_SingleQuote '\''>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShFunction
      keyword: <Id.KW_Function function>
      name_tok: <usage>
      name: usage
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'OPTIND='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'OPTIND='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OPTIND='> name:OPTIND)
                  op: assign_op.Equal
                  rhs: {<0>}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <getopts>
              more_env: []
              words: [
                {<getopts>}
                {<-a>}
                {($ Id.VSub_DollarName command)}
                {(DQ ($ Id.VSub_DollarName USAGE))}
                {<OPT>}
                {(SQ <'--??long'>)}
              ]
              redirects: []
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<2>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Simple
              blame_tok: <getopts>
              more_env: []
              words: [
                {<getopts>}
                {<-a>}
                {($ Id.VSub_DollarName command)}
                {(DQ ($ Id.VSub_DollarName USAGE))}
                {<OPT>}
              ]
              redirects: []
              do_fork: T
            )
          ]
        )
      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: <Id.Lit_Star '*'>
                  pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Simple
                      blame_tok: <usage>
                      more_env: []
                      words: [{<usage>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
              ]
              arms_end: <Id.KW_Esac esac>
              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.DParen
                  left: <Id.Op_DLeftParen _>
                  child: 
                    (arith_expr.Binary
                      op_id: Id.Arith_NEqual
                      left: {($ Id.VSub_Pound '#')}
                      right: {<Id.Lit_Digits 2>}
                    )
                  right: <Id.Op_DRightParen _>
                  redirects: []
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <usage>
              more_env: []
              words: [{<usage>}]
              redirects: []
              do_fork: T
            )
          ]
          spids: [178 191]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'delta='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'delta='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'delta='> name:delta)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number 1)}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'base='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'base='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'base='> name:base)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number 2)}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'changes='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'changes='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'changes='> name:changes)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Pipeline
                    children: [
                      (command.Simple
                        blame_tok: <pax>
                        more_env: []
                        words: [{<pax>} {<--nosummary>} {<-f>} {($ Id.VSub_DollarName delta)}]
                        redirects: [
                          (Redir
                            op: <Id.Redir_Great '2>'>
                            loc: (redir_loc.Fd fd:2)
                            arg: {<'/dev/null'>}
                          )
                        ]
                        do_fork: T
                      )
                      (command.Simple
                        blame_tok: <sed>
                        more_env: []
                        words: [
                          {<sed>}
                          {<-e>}
                          {(SQ <'/^\\(update\\|create\\) /!d'>)}
                          {<-e>}
                          {(SQ <'s/^[^ ]* //'>)}
                        ]
                        redirects: []
                        do_fork: T
                      )
                    ]
                    ops: [<Id.Op_Pipe _>]
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'tmp='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'tmp='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tmp='> name:tmp)
          op: assign_op.Equal
          rhs: {<'/tmp/d2p-'> ($ Id.VSub_Dollar '$')}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <trap>
      more_env: []
      words: [{<trap>} {(DQ <'rm -rf '> ($ Id.VSub_DollarName tmp))} {<0>}]
      redirects: []
      do_fork: T
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <mkdir>
          more_env: []
          words: [
            {<mkdir>}
            {($ Id.VSub_DollarName tmp)}
            {($ Id.VSub_DollarName tmp) <'/old'>}
            {($ Id.VSub_DollarName tmp) <'/new'>}
          ]
          redirects: []
          do_fork: T
        )
        (command.ControlFlow keyword:<Id.ControlFlow_Exit exit>)
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.Simple
      blame_tok: <pax>
      more_env: []
      words: [
        {<pax>}
        {<--nosummary>}
        {<-rf>}
        {($ Id.VSub_DollarName base)}
        {<-s>}
        {(DQ <',.*,'> ($ Id.VSub_DollarName tmp) <'/old/&,'>)}
        {($ Id.VSub_DollarName changes)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <pax>
      more_env: []
      words: [
        {<pax>}
        {<--nosummary>}
        {<-rf>}
        {($ Id.VSub_DollarName delta)}
        {<-z>}
        {($ Id.VSub_DollarName base)}
        {<-s>}
        {(DQ <',.*,'> ($ Id.VSub_DollarName tmp) <'/new/&,'>)}
        {($ Id.VSub_DollarName changes)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Pipeline
      children: [
        (command.Simple
          blame_tok: <diff>
          more_env: []
          words: [
            {<diff>}
            {<-r>}
            {<-N>}
            {<-u>}
            {($ Id.VSub_DollarName tmp) <'/old'>}
            {($ Id.VSub_DollarName tmp) <'/new'>}
          ]
          redirects: []
          do_fork: T
        )
        (command.Simple
          blame_tok: <sed>
          more_env: []
          words: [
            {<sed>}
            {<-e>}
            {(DQ <'s,'> ($ Id.VSub_DollarName tmp) <'/new/,,g'>)}
            {<-e>}
            {(DQ <'s,'> ($ Id.VSub_DollarName tmp) <'/old/,,g'>)}
            {<-e>}
            {
              (SingleQuoted
                left: <Id.Left_DollarSingleQuote '$\''>
                tokens: [
                  <Id.Char_Literals 's/^--- '>
                  <Id.Char_OneChar '\\\\'>
                  <Id.Char_Literals '([^'>
                  <Id.Char_OneChar '\\t'>
                  <Id.Char_Literals ']*'>
                  <Id.Char_OneChar '\\\\'>
                  <Id.Char_Literals ')/&.orig/'>
                ]
                right: <Id.Right_SingleQuote '\''>
              )
            }
            {<-e>}
            {(SQ <'/^diff /s/ [^ ]*$/.orig&/'>)}
          ]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_Pipe _>]
    )
  ]
)