[GLLUG] shell script question

Mike Rambo mrambo@lsd.k12.mi.us
Fri, 12 Jul 2002 12:21:03 -0400

I'm trying to wite a bash shell script that will place a configuration
file in each users home directory. I can come up with a list of targets
by using...

ls /home | grep drwx | cut -d : -f 2 | cut -d \  -f 2

...which I can direct to a file or whatever. Is there a way to take the
resulting list and assign or use each item sequentially as a variable in
a statement something like...

cp file-i-want /home/$TARGET

...to copy this file to potentially many user directories at one time?


Mike Rambo