单目录内容批量下载

#!/bin/bash
#下载
#author:falconhero
#qq:40594324
RED='\E[1;31m'
GRN='\E[1;32m'
YEL='\E[1;33m'
MAG='\E[1;35m'
RES='\E[0m'

echo -e "${RED}请输入目录名称${RES}"
read dir_name
mkdir -p /root/falcon/downlist/$dir_name
cd /root/falcon/downlist/$dir_name
echo -e "${RED}目录创建完毕${RES}"
echo -e "${RED}请输入要下载的批量列表,循环地址不用写${RES}"
read list
for i in {1..9}
do
 cd $dir_name
 wget $list\0$i.jpg &
done
echo -e "${RED}下载结束${RES}"
for i in {1..100}
do
wget $list$i.jpg &
done
echo -e "${RED}下载结束${RES}"
echo -e "${RED}删除3K以下小文件${RES}"
rm -f `find -type f -size -3k`
echo -e "${RED}删除小文件完毕${RES}"

你可能感兴趣的:(linux,职场,下载,批量,休闲)