下载了很多源码包,我想看哪个下载成功了,哪个没下载成功。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
wgethttp: //blog.s135.com/soft/linux/nginx_php/nginx/nginx-0.8.46.tar.gz
wgethttp: //blog.s135.com/soft/linux/nginx_php/php/php-5.2.14.tar.gz
wgethttp: //blog.s135.com/soft/linux/nginx_php/phpfpm/php-5.2.14-fpm-0.5.14.diff.gz
wgethttp: //blog.s135.com/soft/linux/nginx_php/mysql/mysql-5.5.3-m3.tar.gz
wgethttp: //blog.s135.com/soft/linux/nginx_php/libiconv/libiconv-1.13.1.tar.gz
wgethttp: //blog.s135.com/soft/linux/nginx_php/mcrypt/libmcrypt-2.5.8.tar.gz
wgethttp: //blog.s135.com/soft/linux/nginx_php/mcrypt/mcrypt-2.6.8.tar.gz
wgethttp: //blog.s135.com/soft/linux/nginx_php/memcache/memcache-2.2.5.tgz
wgethttp: //blog.s135.com/soft/linux/nginx_php/mhash/mhash-0.9.9.9.tar.gz
wgethttp: //blog.s135.com/soft/linux/nginx_php/pcre/pcre-8.10.tar.gz
wgethttp: //blog.s135.com/soft/linux/nginx_php/eaccelerator/eaccelerator-0.9.6.1.tar.bz2
wgethttp: //blog.s135.com/soft/linux/nginx_php/pdo/PDO_MYSQL-1.0.2.tgz
wgethttp: //blog.s135.com/soft/linux/nginx_php/imagick/ImageMagick.tar.gz
wgethttp: //pecl.php.net/get/imagick-2.3.0.tgz
|
这么多的包,下载的话很长时间。所以,就写了一个脚本来看看是否所有的都下载下来了。
我将上面的链接处理了下,把所有下载下来的压缩包名存在一个文件里
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
[root@Jason64-18tools] #cat~/wget.sh.txt
nginx-0.8.46. tar .gz
php-5.2.14. tar .gz
php-5.2.14-fpm-0.5.14. diff .gz
mysql-5.5.3-m3. tar .gz
libiconv-1.13.1. tar .gz
libmcrypt-2.5.8. tar .gz
mcrypt-2.6.8. tar .gz
memcache-2.2.5.tgz
mhash-0.9.9.9. tar .gz
pcre-8.10. tar .gz
eaccelerator-0.9.6.1. tar .bz2
PDO_MYSQL-1.0.2.tgz
ImageMagick. tar .gz
imagick-2.3.0.tgz
|
-----
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
[root@Jason64-18tools] #pwd
/data/tools
[root@Jason64-18tools] #ls
eaccelerator-0.9.6.1. tar .bz2mcrypt-2.6.8. tar .gzpcre-8.10. tar .gz
ImageMagick. tar .gzmemcache-2.2.5.tgzPDO_MYSQL-1.0.2.tgz
imagick-2.3.0.tgzmhash-0.9.9.9. tar .gzphp-5.2.14-fpm-0.5.14. diff .gz
libiconv-1.13.1. tar .gzmysql-5.5.3-m3. tar .gzphp-5.2.14. tar .gz
libmcrypt-2.5.8. tar .gznginx-0.8.46. tar .gz
[root@Jason64-18tools] #cat/server/scripts/duibi.sh
#!/bin/bash
#program
#thisprogramshowswhichtarsuccessdownloadandwhichnot
. /etc/init .d /functions
file1=~ /wget .sh.txt
A=`
cat $file1`
for i in $A
do
if [-e$i]
then
action
"$i" /bin/true
else
action
"$i" /bin/false
fi
done
|
没下载的将会被显示为[FALSE]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
[root@Jason64-18tools] #sh/server/scripts/duibi.sh
nginx-0.8.46. tar .gz[OK]
php-5.2.14. tar .gz[OK]
php-5.2.14-fpm-0.5.14. diff .gz[OK]
mysql-5.5.3-m3. tar .gz[OK]
libiconv-1.13.1. tar .gz[OK]
libmcrypt-2.5.8. tar .gz[OK]
mcrypt-2.6.8. tar .gz[OK]
memcache-2.2.5.tgz[OK]
mhash-0.9.9.9. tar .gz[FAILED]
pcre-8.10. tar .gz[FAILED]
eaccelerator-0.9.6.1. tar .bz2[OK]
PDO_MYSQL-1.0.2.tgz[OK]
ImageMagick. tar .gz[OK]
imagick-2.3.0.tgz[OK]
|
全部都下载成功了就全部[OK]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
[root@Jason64-18tools] #sh/server/scripts/duibi.sh
nginx-0.8.46. tar .gz[OK]
php-5.2.14. tar .gz[OK]
php-5.2.14-fpm-0.5.14. diff .gz[OK]
mysql-5.5.3-m3. tar .gz[OK]
libiconv-1.13.1. tar .gz[OK]
libmcrypt-2.5.8. tar .gz[OK]
mcrypt-2.6.8. tar .gz[OK]
memcache-2.2.5.tgz[OK]
mhash-0.9.9.9. tar .gz[OK]
pcre-8.10. tar .gz[OK]
eaccelerator-0.9.6.1. tar .bz2[OK]
PDO_MYSQL-1.0.2.tgz[OK]
ImageMagick. tar .gz[OK]
imagick-2.3.0.tgz[OK]
|
以此记录自己以后每次的shell程序...