(command.CommandList
  children: [
    (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 '['>}
                        {(DQ ($ Id.VSub_Pound '#'))}
                        {<-ne>}
                        {(DQ <3>)}
                        {<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 <'Usage: '> 
                    (CommandSub
                      left_token: <Id.Left_Backtick '`'>
                      child: 
                        (command.Simple
                          blame_tok: <basename>
                          more_env: []
                          words: [{<basename>} {($ Id.VSub_Number 0)}]
                          redirects: []
                          do_fork: T
                        )
                      right: <Id.Backtick_Right '`'>
                    ) <' <image_filename> <partition # (1,2,...)> <mount point>'>
                  )
                }
              ]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [25 42]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'FILE='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'FILE='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FILE='> name:FILE)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number 1)}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'PART='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'PART='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PART='> name:PART)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number 2)}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'DEST='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'DEST='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DEST='> name:DEST)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number 3)}
        )
      ]
      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: <parted>
                      more_env: []
                      words: [{<parted>} {<--version>}]
                      redirects: [
                        (Redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'/dev/null'>}
                        )
                        (Redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<1>}
                        )
                      ]
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'UNITS='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'UNITS='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'UNITS='> name:UNITS)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (command.Simple
                                blame_tok: <parted>
                                more_env: []
                                words: [
                                  {<parted>}
                                  {<-s>}
                                  {($ Id.VSub_DollarName FILE)}
                                  {<unit>}
                                  {<s>}
                                  {<print>}
                                ]
                                redirects: [
                                  (Redir
                                    op: <Id.Redir_Great '2>'>
                                    loc: (redir_loc.Fd fd:2)
                                    arg: {<'/dev/null'>}
                                  )
                                ]
                                do_fork: T
                              )
                              (command.Simple
                                blame_tok: <grep>
                                more_env: []
                                words: [{<grep>} {(DQ <' '> ($ Id.VSub_DollarName PART) <' '>)}]
                                redirects: []
                                do_fork: T
                              )
                              (command.Simple
                                blame_tok: <tr>
                                more_env: []
                                words: [{<tr>} {<-d>} {(SQ <s>)}]
                                redirects: []
                                do_fork: T
                              )
                              (command.Simple
                                blame_tok: <awk>
                                more_env: []
                                words: [{<awk>} {(SQ <'{print $2}'>)}]
                                redirects: []
                                do_fork: T
                              )
                            ]
                            ops: [<Id.Op_Pipe _> <Id.Op_Pipe _> <Id.Op_Pipe _>]
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
          ]
          spids: [80 93]
        )
        (IfArm
          keyword: <Id.KW_Elif elif>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <fdisk>
                      more_env: []
                      words: [{<fdisk>} {<-v>}]
                      redirects: [
                        (Redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'/dev/null'>}
                        )
                        (Redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<1>}
                        )
                      ]
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'UNITS='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'UNITS='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'UNITS='> name:UNITS)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (command.Simple
                                blame_tok: <fdisk>
                                more_env: []
                                words: [{<fdisk>} {<-lu>} {($ Id.VSub_DollarName FILE)}]
                                redirects: [
                                  (Redir
                                    op: <Id.Redir_Great '2>'>
                                    loc: (redir_loc.Fd fd:2)
                                    arg: {<'/dev/null'>}
                                  )
                                ]
                                do_fork: T
                              )
                              (command.Simple
                                blame_tok: <grep>
                                more_env: []
                                words: [
                                  {<grep>}
                                  {(DQ ($ Id.VSub_DollarName FILE) ($ Id.VSub_DollarName PART) <' '>)}
                                ]
                                redirects: []
                                do_fork: T
                              )
                              (command.Simple
                                blame_tok: <tr>
                                more_env: []
                                words: [{<tr>} {<-d>} {(SQ <'*'>)}]
                                redirects: []
                                do_fork: T
                              )
                              (command.Simple
                                blame_tok: <awk>
                                more_env: []
                                words: [{<awk>} {(SQ <'{print $2}'>)}]
                                redirects: []
                                do_fork: T
                              )
                            ]
                            ops: [<Id.Op_Pipe _> <Id.Op_Pipe _> <Id.Op_Pipe _>]
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
          ]
          spids: [146 159]
        )
      ]
      else_kw: <Id.KW_Else else>
      else_action: [
        (command.Simple
          blame_tok: <echo>
          more_env: []
          words: [{<echo>} {(DQ <'Can\'t find the fdisk or parted utils. Are you root?'>)}]
          redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
          do_fork: T
        )
        (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'OFFSET='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'OFFSET='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OFFSET='> name:OFFSET)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Simple
                    blame_tok: <expr>
                    more_env: []
                    words: [{<expr>} {<512>} {(SQ <'*'>)} {($ Id.VSub_DollarName UNITS)}]
                    redirects: []
                    do_fork: T
                  )
                right: <Id.Backtick_Right '`'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <mount>
      more_env: []
      words: [
        {<mount>}
        {<-o>}
        {<loop> <Id.Lit_Comma ','> <Id.Lit_VarLike 'offset='> ($ Id.VSub_DollarName OFFSET)}
        {($ Id.VSub_DollarName FILE)}
        {($ Id.VSub_DollarName DEST)}
      ]
      redirects: []
      do_fork: T
    )
  ]
)