On Wed, 21 Mar 2001, Rodos wrote:
> >
> > We've needed a script-pissing contest ...
> >
> >    for f in /home/*; do cp file.file $f; done
> 
> Well I was going with
> 
> find . -maxdepth 1 -exec cp file.file {} \;
> 
> but its a little longer than yours Rick.
> 
> Now I see why people use one character switches on commands, it helps you
> win script-pissing contests. Facing using -maxdepth when -j would suffice!

updated:

for u in /home/*; do if [ -d $u ]; then cp file.file $u; chown $u.$u $u/file.file; fi; 
done

--
Rick Welykochy || Praxis Services



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

Reply via email to