Did I get in first? :-)

On Wed, Mar 21, 2001 at 12:16:35PM +1100, Bernhard L?der wrote:
> I have to copy a file to all user directories.
> 
> cp file.file /home/*
> 
> will only copy file.file to the first user not all users. How would I do
> this without listing the individual directories

for user in `ls /home`
do cp file.file /home/$user
done

Cheers,
Peter

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to