shell新手请多多指教
我的程式码如下
filename='readline.txt'
exec < $filename
while read line
do
echo $line
mkdir $line
cd /test1/$line
ftp -i -n 192.168.139.85 << TMP
user username code
ascii
prompt
cd test_a/$1
mget *.txt
close
bye
TMP
echo "FTP Stop!..."
done
主要的功用是read txt档中的目录名称后,
到远端的ftp至该目录抓档案回来
但我在执行时,出现这个错误讯息
0403-057 Syntax error at line 11 : `<' is not matched.
好像是说 < 没有配对到??
但我若是去掉循环,直接给目录名去open FTP
又是可以成功的
请问有没有人能帮我看是什么问题?
或是该怎么改写比较好~
还是说循环里面不能open ftp呢??
感谢~