variable list of variables
RoBeRt KaRp
robi at bacchus.esa.oz.au
Wed Mar 6 12:05:01 AEST 1991
All below is in Bourne shell.
I am trying to acheive the following:
users="robi henry matt"
for person in $users
do
${person}_files="something that gives me a list of files say x.c y.c z.c"
done
What I want to do now is get to the list of files. Something like:
for file in ${${person}_files}
do
something_to_do_with_file
done
However, I can't access this, ${${person}_files}, variable. The
shell tells me bad substitution for the above and I can't think
of a way to get ${robi_files} (say) out of this.
Any help would be appreciated,
Thanx,
- Robi
--
INTERNET: robi at bacchus.esa.oz.au ACSnet: robi at bacchus.esa.oz
Tel : (+61) (3) 819 4554 Robert Karp///
Fax : (+61) (3) 819 5580 ////
UUCP : uunet!bacchus.esa.oz.au!robi \XXX/
More information about the Comp.unix.shell
mailing list