(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: (bool_expr.Unary op_id:Id.BoolUnary_z child:{(DQ ($ Id.VSub_Number '$1'))})
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:HOST)
                  op: assign_op.Equal
                  rhs: 
                    {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<hostname>} {<-f>}))}
                  spids: [19]
                )
              ]
            )
          ]
          spids: [3 16]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:HOST)
              op: assign_op.Equal
              rhs: {(DQ ($ Id.VSub_Number '$1'))}
              spids: [29]
            )
          ]
        )
      ]
    )
    (command.Simple
      words: [{<knife>} {<client>} {<show>} {($ Id.VSub_DollarName '$HOST')}]
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
      do_fork: T
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RES)
          op: assign_op.Equal
          rhs: {($ Id.VSub_QMark '$?')}
          spids: [48]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_ne
                          left: {(DQ ($ Id.VSub_DollarName '$RES'))}
                          right: {<0>}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'Can\'t find knife client '> ($ Id.VSub_DollarName '$HOST'))})
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_DollarName '$RES')}
            )
          ]
          spids: [51 66]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:admin_val)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<knife>} {<client>} {<show>} {(${ Id.VSub_Name HOST)})
                      (C {<grep>} {<Id.Lit_Other '^'> <admin> <Id.Lit_Colon ':'>})
                      (C {<sed>} {(DQ <'s/admin:[^a-z]*//'>)})
                    ]
                    negated: F
                  )
              )
            }
          spids: [84]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobNEqual
                          left: {(DQ ($ Id.VSub_DollarName '$admin_val'))}
                          right: {(DQ <true>)}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Pipeline
              children: [
                (C {<echo>} {<-e>} 
                  {
                    (DQ <'/'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <admin> 
                      (word_part.EscapedLiteral
                        token: <Id.Lit_EscapedChar '\\"'>
                      ) <': false'> <Id.Lit_BadBackslash '\\'> <'ns/false/true'> <Id.Lit_BadBackslash '\\'> <nw> 
                      <Id.Lit_BadBackslash '\\'> <nq> <Id.Lit_BadBackslash '\\'> <n>
                    )
                  }
                )
                (command.Simple
                  words: [{<knife>} {<client>} {<edit>} {(${ Id.VSub_Name HOST)}]
                  more_env: [(env_pair name:EDITOR val:{<ed>} spids:[157])]
                  do_fork: T
                )
              ]
              negated: F
            )
          ]
          spids: [115 132]
        )
      ]
    )
  ]
)