(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_ne
                      left: {($ Id.VSub_Pound '$#')}
                      right: {(2)}
                    )
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:25)
            )
          ]
          action: [
            (command.Simple
              words: [
                {(echo)}
                {
                  (DQ ('Usage: ') 
                    (command_sub
                      left_token: (Token id:Id.Left_Backtick val:'`' span_id:34)
                      command_list: 
                        (command.CommandList
                          children: [(C {(basename)} {($ Id.VSub_Number '$0')})]
                        )
                    ) (' IP-Address Chef-Environment')
                  )
                }
              ]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_DGreat val:'>>' span_id:44)
                  fd: -1
                  arg_word: {(/dev/stderr)}
                )
              ]
            )
            (command.ControlFlow token:(Token id:Id.ControlFlow_Exit val:exit span_id:49))
          ]
          spids: [14 27]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:HOSTNAME)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: (Token id:Id.Left_Backtick val:'`' span_id:59)
                command_list: (command.CommandList children:[(C {(hostname)} {(-f)})])
              )
            }
          spids: [58]
        )
      ]
    )
    (command.Pipeline
      children: [
        (C {(knife)} {(client)} {(list)})
        (command.Simple
          words: [{(grep)} {($ Id.VSub_DollarName '$HOSTNAME')}]
          redirects: [
            (redir.Redir
              op: (Token id:Id.Redir_Great val:'>' span_id:79)
              fd: -1
              arg_word: {(/dev/null)}
            )
          ]
        )
      ]
      negated: F
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RES)
          op: assign_op.Equal
          rhs: {($ Id.VSub_QMark '$?')}
          spids: [83]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_ne
                      left: {(DQ (${ Id.VSub_Name RES))}
                      right: {(0)}
                    )
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:101)
            )
          ]
          action: [
            (C {(sudo)} {(bash)} {(-c)} 
              {
                (SQ 
                  (Token
                    id: Id.Lit_Chars
                    val: 'EDITOR=true knife client create $(hostname -f) > /etc/chef/client.pem'
                    span_id: 113
                  )
                )
              }
            )
            (C {(knife)} {(actor)} {(map)})
            (C {(knife)} {(group)} {(add)} {(actor)} {(admins)} 
              {
                (command_sub
                  left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:134)
                  command_list: (command.CommandList children:[(C {(hostname)} {(-f)})])
                )
              }
            )
          ]
          spids: [86 103]
        )
      ]
      else_action: [
        (C {(echo)} {(DQ ($ Id.VSub_DollarName '$HOSTNAME') (' already registered in Chef'))})
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: (bool_expr.Unary op_id:Id.BoolUnary_d child:{(/home/vagrant)})
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:165)
            )
          ]
          action: [
            (C {(knife)} {(bootstrap)} {(-E)} {($ Id.VSub_Number '$2')} {($ Id.VSub_Number '$1')} {(-i)} 
              {(/chef-bcpc-host/vbox/insecure_private_key)} {(-x)} {(vagrant)} {(--sudo)}
            )
          ]
          spids: [156 167]
        )
      ]
      else_action: [
        (C {(knife)} {(bootstrap)} {(-E)} {($ Id.VSub_Number '$2')} {($ Id.VSub_Number '$1')} {(-x)} 
          {(ubuntu)} {(--sudo)}
        )
      ]
    )
    (C {(knife)} {(node)} {(run_list)} {(add)} 
      {
        (command_sub
          left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:220)
          command_list: (command.CommandList children:[(C {(hostname)} {(-f)})])
        )
      } {(SQ (Token id:Id.Lit_Chars val:'role[BCPC-Bootstrap]' span_id:227))}
    )
    (C {(sudo)} {(chef-client)})
  ]
)