I need a script that runs on the /tmp directory that counts the number of files that each user owns, and email that resulting number using mutt.
So, lets say I have 3 users:
User101 has 4 files in the /tmp directory, user123 has 1 file in the /tmp directory, and user199 has 10 files in the /tmp directory.
I want an email created that says:
user101 has 4 files
user123 has 1 file
user199 has 10 files
How can I accomplish this with a script?