I need to create 3500 .forward files in users home directories!!! the mail will be forwarded to the same user but at a different domain... Can anyone please help me with this quite urgently please please please...
If that is for all users at that domain, you should do it at the MTA level to avoid eating inodes on the disks.
If it's only for some, you could try as script containing: cat fileofusernames | ( \ while read user do echo "$user@otherdomain" > ~$user/.forward done )
but I'd check and test that first ;-)