I am having an issue with the variable expansion. I want to read a list from a file. The list can have * or multiple file wildcard like - test* stuff*.

Here is the script


filelist=`cat $listdir/$sname.list`

export filelist
export datadirin

# echo filelist is "$filelist"
echo filelist is `cat $listdir/$sname.list`

cd $datadirin

for i in $filelist
echo "getting $i"

I want it to loop thru the list but I do not want it to read what is local, becuase i am going after files I cannot see, I am doing an ftp get.

I'm new at this and any help would be great.

Hey There, it looks like these two variables never get set:


You'll need to assign those variables values. Since it's dynamic, it depends on how you want to do it, but maybe:


Not really sure what you're shooting for. You could seed $listdir with `ls`, but I don't know what you'd be looking for in a listname if you don't know what listname you're looking for.

Hope that helps :)

, Mike