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
#!/bin/bash
datadirin=/home/william/tmp2
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
do
echo "getting $i"
done
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.