I'm getting ready to upgrade to Solaris 10 (from 8) and I'm trying to write a script that will delete approximately 800 user accounts that are no longer required. I'm trying to use the userdel -r command and read the input from a file with the list of user names. I've never been very good at scripting and I'm at a lost as to where to start.
Thanks,
---------- Post updated 10-14-09 at 12:30 PM ---------- Previous update was 10-13-09 at 09:04 PM ----------
#!/bin/ksh
#
for user in $(< dellist.txt)
do
userdel -r $user
done
#
Thanks anyone who is working this! I found my scripting book and started reading last night.