标签:
#!/bin/bash
ip_list=`cat $1`
thead_num=5
tmp_fifofile="/tmp/$$.fifo"
mkfifo "$tmp_fifofile"
exec 4<>"$tmp_fifofile"
rm -f $tmp_fifofile
for ((i=0;i<$thead_num;i++))
do
echo ""
done >&4
for i in $ip_list
do
read -u4
{
ftp -n<<!
open $i
user user1 123456
binary
lcd /home/log/huawei
prompt
mget *
close
bye
!
sleep 3
echo "" >&4
}&
done
wait
exec 4>&-
exit 0
标签:
原文地址:http://www.cnblogs.com/chongchong88/p/ftp_shell.html