Can someone lead me how to do this. I have a bunch of users having .qmail in their home directory. How can I grep or cat whats inside in each of the user's .qmail file? I'm thinking of a bash script with 'for' syntax. Here is the sample:
Quote:
#!/bin/bash
users=`cat /etc/passwd | awk -F: '{print $1}'`
for id in $users
do
cd ~$id/ | cat .qmail
done
|
Now that I got all the list of users, didn't know how to cat/grep the .qmail file in each users. Please advise.
Thanks!