Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UNIX SCRIPT

Status
Not open for further replies.

Scunningham99

Programmer
Sep 20, 2001
815
GB
HI ALL

I have little if not any experience of unix scripting, and would like to write a script where the command who -u is carried out and where the idle time is greater that 10 mins then kill it off. Also a check needs to be done to check it is in the correct group, say admin (322). then it is ok to kill off!!!.

Any help is greatly apreciated.

I though of looping who -u command, and say using set to insert user in to variable ie $1, and also assign time in to $6, do a truncate on it and test if greater than 10 then do.....

thanks in advance!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top