(command.CommandList
  children: [
    (command.Simple blame_tok:<set> more_env:[] words:[{<set>} {<-e>}] redirects:[] do_fork:T)
    (command.ShAssignment
      left: <Id.Lit_VarLike 'script_root='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'script_root='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'script_root='> name:script_root)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Simple
                    blame_tok: <dirname>
                    more_env: []
                    words: [{<dirname>} {(DQ (${ Id.VSub_Name BASH_SOURCE))}]
                    redirects: []
                    do_fork: T
                  )
                right: <Id.Backtick_Right '`'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <source>
      more_env: []
      words: [{<source>} {($ Id.VSub_DollarName script_root) <'/env.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'replicas='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'replicas='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'replicas='> name:replicas)
          op: assign_op.Equal
          rhs: 
            {
              (BracedVarSub
                left: <Id.Left_DollarBrace '${'>
                token: <Id.VSub_Name ETCD_REPLICAS>
                var_name: ETCD_REPLICAS
                suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:{<3>})
                right: <Id.Right_DollarBrace '}'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'CELLS='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'CELLS='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'CELLS='> name:CELLS)
          op: assign_op.Equal
          rhs: 
            {
              (BracedVarSub
                left: <Id.Left_DollarBrace '${'>
                token: <Id.VSub_Name CELLS>
                var_name: CELLS
                suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:{(SQ <test>)})
                right: <Id.Right_DollarBrace '}'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'cells='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'cells='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cells='> name:cells)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (command.Simple
                        blame_tok: <echo>
                        more_env: []
                        words: [{<echo>} {($ Id.VSub_DollarName CELLS)}]
                        redirects: []
                        do_fork: T
                      )
                      (command.Simple
                        blame_tok: <tr>
                        more_env: []
                        words: [{<tr>} {(SQ <','>)} {(SQ <' '>)}]
                        redirects: []
                        do_fork: T
                      )
                    ]
                    ops: [<Id.Op_Pipe _>]
                  )
                right: <Id.Backtick_Right '`'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [cell]
      iterable: (for_iter.Words words:[{(SQ <global>)} {($ Id.VSub_DollarName cells)}])
      semi_tok: <Id.Op_Semi _>
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [
                {<echo>}
                {(DQ <'Generating discovery token for '> ($ Id.VSub_DollarName cell) <' cell...'>)}
              ]
              redirects: []
              do_fork: T
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'discovery='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'discovery='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'discovery='> name:discovery)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <curl>
                            more_env: []
                            words: [
                              {<curl>}
                              {<-sL>}
                              {<https> <Id.Lit_Colon ':'> <'//discovery.etcd.io/new'> 
                                <Id.Lit_QMark '?'> <Id.Lit_VarLike 'size='> ($ Id.VSub_DollarName replicas)
                              }
                            ]
                            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 '['>}
                                {<-z>}
                                {(DQ ($ Id.VSub_DollarName discovery))}
                                {<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 <'Failed to get etcd discovery token for cell \''> 
                            ($ Id.VSub_DollarName cell) <'\'.'>
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [173 186]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [
                {<echo>}
                {(DQ <'Creating etcd service for '> ($ Id.VSub_DollarName cell) <' cell...'>)}
              ]
              redirects: []
              do_fork: T
            )
            (command.Pipeline
              children: [
                (command.Simple
                  blame_tok: <cat>
                  more_env: []
                  words: [{<cat>} {<etcd-service-template.yaml>}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <sed>
                  more_env: []
                  words: [{<sed>} {<-e>} {(DQ <'s/{{cell}}/'> ($ Id.VSub_DollarName cell) <'/g'>)}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <Id.VSub_DollarName '$KUBECTL'>
                  more_env: []
                  words: [{($ Id.VSub_DollarName KUBECTL)} {<create>} {<-f>} {<->}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_Pipe _> <Id.Op_Pipe _>]
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'sed_script='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'sed_script='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'sed_script='> name:sed_script)
                  op: assign_op.Equal
                  rhs: {(DQ )}
                )
              ]
              redirects: []
            )
            (command.ForEach
              keyword: <Id.KW_For for>
              iter_names: [var]
              iterable: (for_iter.Words words:[{<cell>} {<discovery>} {<replicas>}])
              semi_tok: <Id.Op_Semi _>
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'sed_script+='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'sed_script+='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'sed_script+='>
                              name: sed_script
                            )
                          op: assign_op.PlusEqual
                          rhs: 
                            {
                              (DQ <'s,{{'> ($ Id.VSub_DollarName var) <'}},'> 
                                (BracedVarSub
                                  left: <Id.Left_DollarBrace '${'>
                                  token: <Id.VSub_Name var>
                                  var_name: var
                                  prefix_op: <Id.VSub_Bang '!'>
                                  right: <Id.Right_DollarBrace '}'>
                                ) <',g;'>
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [
                {<echo>}
                {
                  (DQ <'Creating etcd replicationcontroller for '> ($ Id.VSub_DollarName cell) 
                    <' cell...'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Pipeline
              children: [
                (command.Simple
                  blame_tok: <cat>
                  more_env: []
                  words: [{<cat>} {<etcd-controller-template.yaml>}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <sed>
                  more_env: []
                  words: [{<sed>} {<-e>} {(DQ ($ Id.VSub_DollarName sed_script))}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <Id.VSub_DollarName '$KUBECTL'>
                  more_env: []
                  words: [{($ Id.VSub_DollarName KUBECTL)} {<create>} {<-f>} {<->}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_Pipe _> <Id.Op_Pipe _>]
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: []
    )
  ]
)