I made something like that a while ago, to list/add/remove things to the ulist
Code:
 users {
  if ($1 == $null) { 
    set %i 1
    while (%i <= $ulist(*,*,0)) { echo -a $bit entry %i $+ 14:15 level: $+ $level($ulist(*,*,%i)) - $ulist(*,*,%i) | inc %i }
    echo -a $bit 0syntax14:15 /users -rl <entry/level> (r = remove/entry l = remove/level)
  }
  if (rl isin $1) { echo -a $bit 0error14:15 one at a time please! | halt }
  if (lr isin $1) { echo -a $bit 0error14:15 one at a time please! | halt }
  if (r isin $1) { /.ruser $ulist(*,*,$2) | echo -a $bit removed $ulist(*,*,$2) from ulist | halt }
  if (l isin $1) { /.rlevel $2 | echo -a $bit removed level $2 | halt }
  halt
}