linux 下批量压缩文件

一堆eps文件要将每个文件单独压缩成一个文件,比如a.eps , b.eps, c.eps 压缩成 a.zip ,b.zip ,c.zip

for EPS in `ls *.eps`; do zip $EPS.zip $EPS; ZIP=`echo $EPS|awk -F"." {'print $1'}`; mv $EPS.zip $ZIP.zip; done

 

短小精悍,适当修改可以适用很多场合,网上搜来的,不敢独享

Loading

Add a Comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.