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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

comparing list A to list B

Status
Not open for further replies.

newtarge

ISP
Oct 27, 2003
21
0
0
US
I'm writing a script to check mail quota for each user and warn them accordingly. I ran into a problem when i tried to compare a user list from the passwd file to the listed boxes in /var/mail. I want to eliminate out of the passwd list what i not in the /var/mail list. i have pushed one list in to scalar variables and the other in an array and tried to match all on the list to each line of the array and it does not work. any suggestions?
 
If you want to eliminate users from the passwd list that are not in the /var/mail list, why not just use the list from /var/mail and forget trying to compare the two?
 
raklet has a good point, in what situation would there be a /var/mail file for an account that was not in the passwd file?
 
You're writing a script to send an e-mail if the account is approaching its threshold of quota? Isn't this just adding to the problem?

--Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top