a little shell problem
der.hans
plug-discuss@lists.plug.phoenix.az.us
Fri, 11 Oct 2002 18:57:42 -0700 (MST)
Am 11. Oct, 2002 schwätzte John Olson so:
> This is kind of a kluge, but it works:
>
> CLIENTS="`echo ~user1`
> `echo ~user2`"
Congrats. You almost got it :).
CLIENTS=`echo ~fred ~anke ~georg ~uwe ~matthias`
The improvement is to just make it one sub-shell rather than multiple
sub-shells. Makes a big difference if you're doing this for 1000's of
accounts.
> for X in $CLIENTS ; do
> ls $X
> done
>
> Note that's a back-tick, not a single quote.
Lynn's known what backticks are for more years than he wants me to mention
on a public list :), but you have no way of knowing that through a mailing
list. There's probably people besides Lynn looking at the answers anyway.
We still need a way to do:
for $username in $users
do
userdir=~$username
...
done
ciao,
der.hans
--
# https://www.LuftHans.com/ http://www.TOLISGroup.com/
# You can't handle the source! - der.hans