(command.CommandList
  children: [
    (command.ShFunction
      keyword: <Id.KW_Function function>
      name_tok: <err_exit>
      name: err_exit
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <print>
              more_env: []
              words: [{<print>} {<-u2>} {<-n>} {(DQ <Id.Lit_BadBackslash '\\'> <t>)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <print>
              more_env: []
              words: [
                {<print>}
                {<-u2>}
                {<-r>}
                {($ Id.VSub_DollarName Command) <Id.Lit_Colon ':'>}
                {(DQ ($ Id.VSub_At '@'))}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <let>
              more_env: []
              words: [{<let>} {<Id.Lit_VarLike 'Errors+='> <1>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <alias>
      more_env: []
      words: [{<alias>} {<Id.Lit_VarLike 'err_exit='> (SQ <'err_exit $LINENO'>)}]
      redirects: []
      do_fork: T
    )
    (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: 
            {
              (BracedVarSub
                left: <Id.Left_DollarBrace '${'>
                token: <Id.VSub_Number 0>
                var_name: 0
                suffix_op: 
                  (suffix_op.Unary
                    op: <Id.VOp1_DPound '##'>
                    arg_word: {<Id.Lit_Other '*'> <Id.Lit_Slash '/'>}
                  )
                right: <Id.Right_DollarBrace '}'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <integer>
      more_env: []
      words: [{<integer>} {<Id.Lit_VarLike 'Errors='> <0>}]
      redirects: []
      do_fork: T
    )
    (command.AndOr
      children: [
        (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: 
                {
                  (CommandSub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Simple
                        blame_tok: <mktemp>
                        more_env: []
                        words: [{<mktemp>} {<-dt>}]
                        redirects: []
                        do_fork: T
                      )
                    right: <Id.Eof_RParen _>
                  )
                }
            )
          ]
          redirects: []
        )
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <err_exit>
                  more_env: []
                  words: [{<err_exit>} {<mktemp>} {<-dt>} {<failed>}]
                  redirects: []
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
            (command.Sentence
              child: (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              terminator: <Id.Op_Semi _>
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.Simple
      blame_tok: <trap>
      more_env: []
      words: [{<trap>} {(DQ <'cd /; rm -rf '> ($ Id.VSub_DollarName tmp))} {<EXIT>}]
      redirects: []
      do_fork: T
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Simple
                  blame_tok: <Id.VSub_DollarName '$SHELL'>
                  more_env: []
                  words: [{($ Id.VSub_DollarName SHELL)} {<-c>} {(SQ <'[[ ~root == /* ]]'>)}]
                  redirects: []
                  do_fork: T
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'x='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'x='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'x='> name:x)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <print>
                            more_env: []
                            words: [
                              {<print>}
                              {<-r>}
                              {<-->}
                              {(word_part.TildeSub token:<Id.Lit_TildeLike '~root'> user_name:root)}
                            ]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.AndOr
              children: [
                (command.DBracket
                  left: <Id.KW_DLeftBracket '[['>
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobDEqual
                      left: {($ Id.VSub_DollarName x)}
                      right: {(word_part.TildeSub token:<Id.Lit_TildeLike '~root'> user_name:root)}
                    )
                  right: <Id.Lit_DRightBracket ']]'>
                  redirects: []
                )
                (command.Simple
                  blame_tok: <err_exit>
                  more_env: []
                  words: [{<err_exit>} {(SQ <'~user expanded in subshell prevent ~user from working'>)}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DPipe _>]
            )
          ]
          spids: [156 166]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShFunction
      keyword: <Id.KW_Function function>
      name_tok: <home>
      name: home
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <typeset>
              more_env: []
              words: [
                {<typeset>}
                {<Id.Lit_VarLike 'IFS='> <Id.Lit_Colon ':'>}
                {<Id.Lit_VarLike 'pwd='> <'/etc/passwd'>}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <set>
              more_env: []
              words: [{<set>} {<-o>} {<noglob>}]
              redirects: []
              do_fork: T
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.AndOr
                          children: [
                            (command.DBracket
                              left: <Id.KW_DLeftBracket '[['>
                              expr: 
                                (bool_expr.Unary
                                  op_id: Id.BoolUnary_f
                                  child: {($ Id.VSub_DollarName pwd)}
                                )
                              right: <Id.Lit_DRightBracket ']]'>
                              redirects: []
                            )
                            (command.Simple
                              blame_tok: <grep>
                              more_env: []
                              words: [
                                {<grep>}
                                {<-c>}
                                {(DQ <'^'> ($ Id.VSub_Number 1) <':'>)}
                                {($ Id.VSub_DollarName pwd)}
                              ]
                              redirects: [
                                (Redir
                                  op: <Id.Redir_Great '>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<'/dev/null'>}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                          ops: [<Id.Op_DAmp _>]
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <set>
                      more_env: []
                      words: [
                        {<set>}
                        {<-->}
                        {
                          (CommandSub
                            left_token: <Id.Left_DollarParen '$('>
                            child: 
                              (command.Simple
                                blame_tok: <grep>
                                more_env: []
                                words: [
                                  {<grep>}
                                  {(DQ <'^'> ($ Id.VSub_Number 1) <':'>)}
                                  {($ Id.VSub_DollarName pwd)}
                                ]
                                redirects: []
                                do_fork: T
                              )
                            right: <Id.Eof_RParen _>
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <print>
                      more_env: []
                      words: [{<print>} {<-r>} {<-->} {(DQ ($ Id.VSub_Number 6))}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [227 256]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.Simple
                  blame_tok: <print>
                  more_env: []
                  words: [{<print>} {<.>}]
                  redirects: []
                  do_fork: T
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'OLDPWD='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'OLDPWD='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OLDPWD='> name:OLDPWD)
          op: assign_op.Equal
          rhs: {<'/bin'>}
        )
      ]
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.DBracket
                  left: <Id.KW_DLeftBracket '[['>
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobNEqual
                      left: {(word_part.TildeSub token:<Id.Lit_TildeLike '~'>)}
                      right: {($ Id.VSub_DollarName HOME)}
                    )
                  right: <Id.Lit_DRightBracket ']]'>
                  redirects: []
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <err_exit>
              more_env: []
              words: [{<err_exit>} {(SQ <'~'>)} {<not>} {($ Id.VSub_DollarName HOME)}]
              redirects: []
              do_fork: T
            )
          ]
          spids: [301 313]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'x='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'x='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'x='> name:x)
          op: assign_op.Equal
          rhs: {(word_part.TildeSub token:<Id.Lit_TildeLike '~'>)}
        )
      ]
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.DBracket
                  left: <Id.KW_DLeftBracket '[['>
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobNEqual
                      left: {($ Id.VSub_DollarName x)}
                      right: {($ Id.VSub_DollarName HOME)}
                    )
                  right: <Id.Lit_DRightBracket ']]'>
                  redirects: []
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <err_exit>
              more_env: []
              words: [
                {<err_exit>}
                {<Id.Lit_VarLike 'x='> <Id.Lit_TildeLike '~'>}
                {<not>}
                {($ Id.VSub_DollarName HOME)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          spids: [330 342]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'x='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'x='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'x='> name:x)
          op: assign_op.Equal
          rhs: {<x> <Id.Lit_Colon ':'> (word_part.TildeSub token:<Id.Lit_TildeLike '~'>)}
        )
      ]
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.DBracket
                  left: <Id.KW_DLeftBracket '[['>
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobNEqual
                      left: {($ Id.VSub_DollarName x)}
                      right: {<x> <Id.Lit_Colon ':'> ($ Id.VSub_DollarName HOME)}
                    )
                  right: <Id.Lit_DRightBracket ']]'>
                  redirects: []
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <err_exit>
              more_env: []
              words: [
                {<err_exit>}
                {<Id.Lit_VarLike 'x='> <x> <Id.Lit_Colon ':'> <Id.Lit_TildeLike '~'>}
                {<not>}
                {<x> <Id.Lit_Colon ':'> ($ Id.VSub_DollarName HOME)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          spids: [360 374]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.DBracket
                  left: <Id.KW_DLeftBracket '[['>
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobNEqual
                      left: {<Id.Lit_TildeLike '~'> <Id.Lit_Other '+'>}
                      right: {($ Id.VSub_DollarName PWD)}
                    )
                  right: <Id.Lit_DRightBracket ']]'>
                  redirects: []
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <err_exit>
              more_env: []
              words: [{<err_exit>} {(SQ <'~'>)} {<not>} {($ Id.VSub_DollarName PWD)}]
              redirects: []
              do_fork: T
            )
          ]
          spids: [391 404]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'x='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'x='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'x='> name:x)
          op: assign_op.Equal
          rhs: {<Id.Lit_TildeLike '~'> <Id.Lit_Other '+'>}
        )
      ]
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.DBracket
                  left: <Id.KW_DLeftBracket '[['>
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobNEqual
                      left: {($ Id.VSub_DollarName x)}
                      right: {($ Id.VSub_DollarName PWD)}
                    )
                  right: <Id.Lit_DRightBracket ']]'>
                  redirects: []
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <err_exit>
              more_env: []
              words: [
                {<err_exit>}
                {<Id.Lit_VarLike 'x='> <Id.Lit_TildeLike '~'> <Id.Lit_Other '+'>}
                {<not>}
                {($ Id.VSub_DollarName PWD)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          spids: [422 434]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.DBracket
                  left: <Id.KW_DLeftBracket '[['>
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobNEqual
                      left: {(word_part.TildeSub token:<Id.Lit_TildeLike '~-'> user_name:-)}
                      right: {($ Id.VSub_DollarName OLDPWD)}
                    )
                  right: <Id.Lit_DRightBracket ']]'>
                  redirects: []
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <err_exit>
              more_env: []
              words: [{<err_exit>} {(SQ <'~'>)} {<not>} {($ Id.VSub_DollarName PWD)}]
              redirects: []
              do_fork: T
            )
          ]
          spids: [448 460]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'x='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'x='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'x='> name:x)
          op: assign_op.Equal
          rhs: {(word_part.TildeSub token:<Id.Lit_TildeLike '~-'> user_name:-)}
        )
      ]
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.DBracket
                  left: <Id.KW_DLeftBracket '[['>
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobNEqual
                      left: {($ Id.VSub_DollarName x)}
                      right: {($ Id.VSub_DollarName OLDPWD)}
                    )
                  right: <Id.Lit_DRightBracket ']]'>
                  redirects: []
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <err_exit>
              more_env: []
              words: [
                {<err_exit>}
                {<Id.Lit_VarLike 'x='> <Id.Lit_TildeLike '~-'>}
                {<not>}
                {($ Id.VSub_DollarName OLDPWD)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          spids: [477 489]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [u]
      iterable: (for_iter.Words words:[{<root>} {<Administrator>}])
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'h='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'h='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'h='> name:h)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <home>
                            more_env: []
                            words: [{<home>} {($ Id.VSub_DollarName u)}]
                            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.DBracket
                          left: <Id.KW_DLeftBracket '[['>
                          expr: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_GlobNEqual
                              left: {($ Id.VSub_DollarName h)}
                              right: {<.>}
                            )
                          right: <Id.Lit_DRightBracket ']]'>
                          redirects: []
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.AndOr
                      children: [
                        (command.DBracket
                          left: <Id.KW_DLeftBracket '[['>
                          expr: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_ef
                              left: {<Id.Lit_TildeLike '~'> ($ Id.VSub_DollarName u)}
                              right: {($ Id.VSub_DollarName h)}
                            )
                          right: <Id.Lit_DRightBracket ']]'>
                          redirects: []
                        )
                        (command.Simple
                          blame_tok: <err_exit>
                          more_env: []
                          words: [
                            {<err_exit>}
                            {(DQ <'~'> ($ Id.VSub_DollarName u) <' not '> ($ Id.VSub_DollarName h))}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DPipe _>]
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'x='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'x='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'x='> name:x)
                          op: assign_op.Equal
                          rhs: {<Id.Lit_TildeLike '~'> ($ Id.VSub_DollarName u)}
                        )
                      ]
                      redirects: []
                    )
                    (command.AndOr
                      children: [
                        (command.DBracket
                          left: <Id.KW_DLeftBracket '[['>
                          expr: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_ef
                              left: {($ Id.VSub_DollarName x)}
                              right: {($ Id.VSub_DollarName h)}
                            )
                          right: <Id.Lit_DRightBracket ']]'>
                          redirects: []
                        )
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'x='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'x='>
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'x='> name:x)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ <'~'> ($ Id.VSub_DollarName u) <' not '> ($ Id.VSub_DollarName h))
                                }
                            )
                          ]
                          redirects: []
                        )
                      ]
                      ops: [<Id.Op_DPipe _>]
                    )
                    (command.ControlFlow keyword:<Id.ControlFlow_Break break>)
                  ]
                  spids: [522 535]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'x='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'x='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'x='> name:x)
          op: assign_op.Equal
          rhs: {(word_part.TildeSub token:<Id.Lit_TildeLike '~g.r.emlin'> user_name:g.r.emlin)}
        )
      ]
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.DBracket
                  left: <Id.KW_DLeftBracket '[['>
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobNEqual
                      left: {($ Id.VSub_DollarName x)}
                      right: {(SQ <'~g.r.emlin'>)}
                    )
                  right: <Id.Lit_DRightBracket ']]'>
                  redirects: []
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <err_exit>
              more_env: []
              words: [
                {<err_exit>}
                {
                  (DQ <'x=~g.r.emlin failed -- expected \'~g.r.emlin\', got \''> 
                    ($ Id.VSub_DollarName x) <'\''>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          spids: [596 610]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'x='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'x='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'x='> name:x)
          op: assign_op.Equal
          rhs: 
            {(word_part.TildeSub token:<Id.Lit_TildeLike '~'>) <Id.Lit_Colon ':'> 
              (word_part.TildeSub token:<Id.Lit_TildeLike '~'>)
            }
        )
      ]
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.DBracket
                  left: <Id.KW_DLeftBracket '[['>
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobNEqual
                      left: {($ Id.VSub_DollarName x)}
                      right: {(DQ ($ Id.VSub_DollarName HOME) <':'> ($ Id.VSub_DollarName HOME))}
                    )
                  right: <Id.Lit_DRightBracket ']]'>
                  redirects: []
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <err_exit>
              more_env: []
              words: [
                {<err_exit>}
                {
                  (DQ <'x=~:~ failed, expected \''> ($ Id.VSub_DollarName HOME) <':'> 
                    ($ Id.VSub_DollarName HOME) <'\', got \''> ($ Id.VSub_DollarName x) <'\''>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          spids: [627 643]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'HOME='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'HOME='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'HOME='> name:HOME)
          op: assign_op.Equal
          rhs: {<'/'>}
        )
      ]
      redirects: []
    )
    (command.AndOr
      children: [
        (command.DBracket
          left: <Id.KW_DLeftBracket '[['>
          expr: 
            (bool_expr.Binary
              op_id: Id.BoolBinary_GlobDEqual
              left: {(word_part.TildeSub token:<Id.Lit_TildeLike '~'>)}
              right: {<'/'>}
            )
          right: <Id.Lit_DRightBracket ']]'>
          redirects: []
        )
        (command.Simple
          blame_tok: <err_exit>
          more_env: []
          words: [{<err_exit>} {(SQ <'~ should be /'>)}]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.AndOr
      children: [
        (command.DBracket
          left: <Id.KW_DLeftBracket '[['>
          expr: 
            (bool_expr.Binary
              op_id: Id.BoolBinary_GlobDEqual
              left: {(word_part.TildeSub token:<Id.Lit_TildeLike '~'>) <'/foo'>}
              right: {<'/foo'>}
            )
          right: <Id.Lit_DRightBracket ']]'>
          redirects: []
        )
        (command.Simple
          blame_tok: <err_exit>
          more_env: []
          words: [{<err_exit>} {(SQ <'~/foo should be /foo when ~==/'>)}]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.Simple
      blame_tok: <print>
      more_env: []
      words: [
        {<print>}
        {
          (SingleQuoted
            left: <Id.Left_DollarSingleQuote '$\''>
            tokens: [
              <Id.Char_Literals 'print ~+'>
              <Id.Char_OneChar '\\n'>
              <Id.Char_Literals '[[ $1 ]] && $0'>
            ]
            right: <Id.Right_SingleQuote '\''>
          )
        }
      ]
      redirects: [
        (Redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName tmp) <'/tilde'>}
        )
      ]
      do_fork: T
    )
    (command.Simple
      blame_tok: <chmod>
      more_env: []
      words: [{<chmod>} {<Id.Lit_Other '+'> <x>} {($ Id.VSub_DollarName tmp) <'/tilde'>}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'nl='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'nl='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'nl='> name:nl)
          op: assign_op.Equal
          rhs: 
            {
              (SingleQuoted
                left: <Id.Left_DollarSingleQuote '$\''>
                tokens: [<Id.Char_OneChar '\\n'>]
                right: <Id.Right_SingleQuote '\''>
              )
            }
        )
      ]
      redirects: []
    )
    (command.AndOr
      children: [
        (command.DBracket
          left: <Id.KW_DLeftBracket '[['>
          expr: 
            (bool_expr.Binary
              op_id: Id.BoolBinary_GlobDEqual
              left: 
                {
                  (CommandSub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Simple
                        blame_tok: <Id.VSub_DollarName '$tmp'>
                        more_env: []
                        words: [{($ Id.VSub_DollarName tmp) <'/tilde'>} {<foo>}]
                        redirects: []
                        do_fork: T
                      )
                    right: <Id.Eof_RParen _>
                  )
                }
              right: 
                {(DQ ($ Id.VSub_DollarName PWD) ($ Id.VSub_DollarName nl) ($ Id.VSub_DollarName PWD))}
            )
          right: <Id.Lit_DRightBracket ']]'>
          redirects: [(Redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})]
        )
        (command.Simple
          blame_tok: <err_exit>
          more_env: []
          words: [{<err_exit>} {(SQ <'tilde fails inside a script run by name'>)}]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.ControlFlow
      keyword: <Id.ControlFlow_Exit exit>
      arg_word: 
        {
          (word_part.ArithSub
            left: <Id.Left_DollarDParen '$(('>
            anode: 
              (arith_expr.TernaryOp
                cond: 
                  (arith_expr.Binary
                    op_id: Id.Arith_Less
                    left: ($ Id.Lit_ArithVarLike Errors)
                    right: {<Id.Lit_Digits 125>}
                  )
                true_expr: ($ Id.Lit_ArithVarLike Errors)
                false_expr: {<Id.Lit_Digits 125>}
              )
            right: <Id.Right_DollarDParen _>
          )
        }
    )
  ]
)