(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:pwfile)
          op: assign_op.Equal
          rhs: {(DQ <'/etc/passwd'>)}
          spids: [14]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:shadowfile)
          op: assign_op.Equal
          rhs: {(DQ <'/etc/shadow'>)}
          spids: [20]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:gfile)
          op: assign_op.Equal
          rhs: {(DQ <'/etc/group'>)}
          spids: [25]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:hdir)
          op: assign_op.Equal
          rhs: {(DQ <'/home'>)}
          spids: [30]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} 
                      {(DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<id>} {<-un>})))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <root>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<echo>} {(DQ <'Error: You must be root to run this command.'>)}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [36 59]
        )
      ]
    )
    (C {<echo>} 
      {
        (DQ <'Add new user account to '> 
          (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<hostname>}))
        )
      }
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: (C {<echo>} {<-n>} {(DQ <'login: '>)})
          terminator: <Id.Op_Semi _>
        )
        (C {<read>} {<login>})
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:uid)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  child: 
                    (C {<awk>} {<-F> <Id.Lit_Colon ':'>} 
                      {(SQ <'{ if (big < $3 && $3 < 5000) big=$3 } END { print big + 1 }'>)} {($ Id.VSub_DollarName '$pwfile')}
                    )
                )
              )
            }
          spids: [113]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:homedir)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$hdir') <'/'> ($ Id.VSub_DollarName '$login')}
          spids: [129]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:gid)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$uid')}
          spids: [138]
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: (C {<echo>} {<-n>} {(DQ <'full name: '>)})
          terminator: <Id.Op_Semi _>
        )
        (C {<read>} {<fullname>})
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: (C {<echo>} {<-n>} {(DQ <'shell: '>)})
          terminator: <Id.Op_Semi _>
        )
        (C {<read>} {<shell>})
      ]
    )
    (C {<echo>} 
      {
        (DQ <'Setting up account '> ($ Id.VSub_DollarName '$login') <' for '> 
          ($ Id.VSub_DollarName '$fullname') <...>
        )
      }
    )
    (command.Simple
      words: [
        {<echo>}
        {(${ Id.VSub_Name login) <Id.Lit_Colon ':'> <x> <Id.Lit_Colon ':'> (${ Id.VSub_Name uid) 
          <Id.Lit_Colon ':'> (${ Id.VSub_Name gid) <Id.Lit_Colon ':'> (${ Id.VSub_Name fullname) <Id.Lit_Colon ':'> 
          (${ Id.VSub_Name homedir) <Id.Lit_Colon ':'> ($ Id.VSub_DollarName '$shell')
        }
      ]
      redirects: [
        (redir
          op: <Id.Redir_DGreat '>>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName '$pwfile')}
        )
      ]
      do_fork: T
    )
    (command.Simple
      words: [
        {<echo>}
        {(${ Id.VSub_Name login) <Id.Lit_Colon ':'> <Id.Lit_Star '*'> <Id.Lit_Colon ':'> <11647> 
          <Id.Lit_Colon ':'> <0> <Id.Lit_Colon ':'> <99999> <Id.Lit_Colon ':'> <7> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> 
          <Id.Lit_Colon ':'>
        }
      ]
      redirects: [
        (redir
          op: <Id.Redir_DGreat '>>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName '$shadowfile')}
        )
      ]
      do_fork: T
    )
    (command.Simple
      words: [
        {<echo>}
        {
          (DQ (${ Id.VSub_Name login) <':x:'> (${ Id.VSub_Name gid) <':'> ($ Id.VSub_DollarName '$login'))
        }
      ]
      redirects: [
        (redir
          op: <Id.Redir_DGreat '>>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName '$gfile')}
        )
      ]
      do_fork: T
    )
    (C {<mkdir>} {($ Id.VSub_DollarName '$homedir')})
    (C {<cp>} {<-R>} 
      {<'/etc/skel/.'> <Id.Lit_LBracket '['> <a-zA-Z> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'>} {($ Id.VSub_DollarName '$homedir')}
    )
    (C {<chmod>} {<755>} {($ Id.VSub_DollarName '$homedir')})
    (C {<chown>} {<-R>} {(${ Id.VSub_Name login) <Id.Lit_Colon ':'> (${ Id.VSub_Name login)} 
      {($ Id.VSub_DollarName '$homedir')}
    )
    (C {<exec>} {<passwd>} {($ Id.VSub_DollarName '$login')})
  ]
)