(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:locatedb)
          op: Equal
          rhs: {(DQ (/var/locate.db))}
          spids: [17]
        )
      ]
      spids: [17]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:slocatedb) op:Equal rhs:{(DQ (.slocatedb))} spids:[22])]
      spids: [22]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} 
                  {
                    (DQ 
                      (CommandSubPart
                        command_list: (CommandList children:[(C {(id)} {(-nu)})])
                        left_token: <Left_CommandSub '$('>
                        spids: [33 37]
                      )
                    )
                  } {(KW_Bang '!') (Lit_Other '=')} {(DQ (root))} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [
                {(echo)}
                {(DQ ($ VSub_Number '$0') (': Error: You must be root to run this command.'))}
              ]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[61])]
            )
            (C {(exit)} {(1)})
          ]
          spids: [-1 51]
        )
      ]
      spids: [-1 69]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} 
                  {
                    (DQ 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(grep)} {(SQ <'^nobody:'>)} {(/etc/passwd)})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [77 85]
                      )
                    )
                  } {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [
                {(echo)}
                {(DQ ($ VSub_Number '$0') (": Error: you must have an account for user 'nobody'"))}
              ]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[107])]
            )
            (Sentence
              child: 
                (SimpleCommand
                  words: [{(echo)} {(DQ ('to create the default slocate database.'))}]
                  redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[117])]
                )
              terminator: <Op_Semi ';'>
            )
            (C {(exit)} {(1)})
          ]
          spids: [-1 97]
        )
      ]
      spids: [-1 125]
    )
    (C {(cd)} {(/)})
    (SimpleCommand
      words: [{(su)} {(-fm)} {(nobody)} {(-c)} {(DQ ('find / -print'))}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{($ VSub_Name '$locatedb')} spids:[151])
        (Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[155])
      ]
    )
    (C {(echo)} {(DQ ('building default slocate database (user = nobody)'))})
    (C {(echo)} {(...)} {(result)} {(is)} 
      {
        (CommandSubPart
          command_list: 
            (CommandList
              children: [
                (SimpleCommand
                  words: [{(wc)} {(-l)}]
                  redirects: [
                    (Redir
                      op_id: Redir_Less
                      fd: -1
                      arg_word: {($ VSub_Name '$locatedb')}
                      spids: [177]
                    )
                  ]
                )
              ]
            )
          left_token: <Left_CommandSub '$('>
          spids: [172 180]
        )
      } {(lines)} {(long.)}
    )
    (ForEach
      iter_name: account
      iter_words: [
        {
          (CommandSubPart
            command_list: 
              (CommandList
                children: [(C {(cut)} {(-d) (Lit_Other ':')} {(-f1)} {(/etc/passwd)})]
              )
            left_token: <Left_CommandSub '$('>
            spids: [199 208]
          )
        }
      ]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:homedir)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (Pipeline
                                  children: [
                                    (C {(grep)} {(DQ ('^') (${ VSub_Name account) (':'))} 
                                      {(/etc/passwd)}
                                    )
                                    (C {(cut)} {(-d) (Lit_Other ':')} {(-f6)})
                                  ]
                                  negated: False
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [215 236]
                        )
                      )
                    }
                  spids: [213]
                )
              ]
              spids: [213]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$homedir'))} {(Lit_Other '=')} {(DQ (/))} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(ControlFlow token:<ControlFlow_Continue continue>)]
                  spids: [-1 259]
                )
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(-e)} 
                          {($ VSub_Name '$homedir') (/) ($ VSub_Name '$slocatedb')} {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ ('building slocate database for user ') ($ VSub_Name '$account'))})
                    (SimpleCommand
                      words: [{(su)} {(-m)} {($ VSub_Name '$account')} {(-c)} {(DQ ('find / -print'))}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: -1
                          arg_word: {($ VSub_Name '$homedir') (/) ($ VSub_Name '$slocatedb')}
                          spids: [305]
                        )
                        (Redir
                          op_id: Redir_Great
                          fd: 2
                          arg_word: {(/dev/null)}
                          spids: [313]
                        )
                      ]
                    )
                    (C {(chmod)} {(600)} {($ VSub_Name '$homedir') (/) ($ VSub_Name '$slocatedb')})
                    (C {(chown)} {($ VSub_Name '$account')} 
                      {($ VSub_Name '$homedir') (/) ($ VSub_Name '$slocatedb')}
                    )
                    (C {(echo)} {(...)} {(result)} {(is)} 
                      {
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (SimpleCommand
                                  words: [{(wc)} {(-l)}]
                                  redirects: [
                                    (Redir
                                      op_id: Redir_Less
                                      fd: -1
                                      arg_word: 
                                        {($ VSub_Name '$homedir') (/) ($ VSub_Name '$slocatedb')}
                                      spids: [348]
                                    )
                                  ]
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [343 353]
                        )
                      } {(lines)} {(long.)}
                    )
                  ]
                  spids: [268 282]
                )
              ]
              spids: [-1 360]
            )
          ]
          spids: [210 362]
        )
      spids: [198 -1]
    )
    (C {(exit)} {(0)})
  ]
)