kill "/usr/employees/larry" kill "/usr/employees/roger" kill "/usr/employees/gary" rmdir "/usr/employees"removes the directory "/usr/employees" but only after removing several files known to have been in that directory.
Note well that enchanting a program with a privileged status is hazardous to the health of a UNIX system, not only can a bug in the program reek havoc but if care is not taken, a set-user-id program can be used by an unauthorized and unscrupulous user to usurp control of the system. The shell statement is the best way to operate on directories, for example:
shell "rmdir /usr/employees"By this method, the privileged status is invoked only when it is necessary and risk of damaging the system with an omnipotent BASIC program is minimized. At the very least, this technique ought to be used while the program is being developed and replaced with the rmdir statement and privileged status only for the final version.
The importance of avoiding set-user-id programs owned by the super-user can not be overemphasized.
from The Basmark QuickBASIC Programmerís Manual by Lawrence Leinweber