[HPADM] Scripting user list



Greetings!

i want to exclude certain ID's from the logins command to execute some_command. Here is the format of the ID's that i want to EXCLUDE (id's of the type 2letters, 4 nos, and 2 letters, 3 nos and one letter).

i currently have this script

logins -u | while read USERID X
do
[ "${USERID}" = logins -u |grep -q -E '^[a-zA-Z]{2}[0-9]{3}[a-zA-Z0-9]$' ] && continue

echo ${USERID}
done

This would echo all id of the format mentioned above. Now i want a script that would EXCLUDE all id's of this format and print the rest of the ID's (like oracle, dba, oradba10 etc..)

Please help

Thanks

Brian.

Brian.




--
---> Please post QUESTIONS and SUMMARIES only!! <---
To subscribe/unsubscribe to this list, contact majordomo@xxxxxxxxxxxxx
Name: hpux-admin@xxxxxxxxxxxxx Owner: owner-hpux-admin@xxxxxxxxxxxxx

Archives: ftp.dutchworks.nl:/pub/digests/hpux-admin (FTP, browse only)
http://www.dutchworks.nl/htbin/hpsysadmin (Web, browse & search)



Relevant Pages

  • Scripting user list
    ... i currently have this script ... logins -u | while read USERID X ... echo $ ...
    (SunManagers)
  • Re: login security question
    ... > But can't the application role be restricted from using the QA/EM? ... App roles is a nice feature for ... Other options includes app logins using a special password (but all users will use the ... The application passes the userid to the stored procedures. ...
    (microsoft.public.sqlserver.server)
  • Re: Make
    ... echo "UserId: $" ... echo "enter username (type end to exit)" ...
    (comp.unix.questions)
  • Re: Make
    ... echo "UserId: $" ... echo "enter username (type end to exit)" ...
    (comp.unix.questions)
  • Cannot reference derived table from a derived table in a subquery?
    ... Invalid column name 'UserID'. ... IsActive tinyint) ... CREATE TABLE #Logins ( ... ActiveUsers.*, ...
    (microsoft.public.sqlserver.programming)