a little shell problem

der.hans plug-discuss@lists.plug.phoenix.az.us
Fri, 11 Oct 2002 18:39:17 -0700 (MST)


Am 11. Oct, 2002 schwätzte Michael Knee so:

> How about
>
> HOME="/home"
> CLIENTS="$HOME/joe/foo
>           $HOME/blow/foo
>           $HOME/schmo/blah"

That doesn't work if someone ever ends up not being in /home.

Grepping the users out of /etc/passwd would work, but it'd be a lot of
overhead to grep it each time. Reading it into an array, then yanking them
out as you go might work, but if you hit something with 45000+ accounts (
e.g. ASU ), then you'll still have a lot of overhead.

ciao,

der.hans
-- 
#  https://www.LuftHans.com/    http://www.TOLISGroup.com/
#  Hope has two beautiful daughters: Anger and Courage. Anger at the way
#  things are, and Courage to struggle to create things as they should be.
#  -- St. Augustine