[root@harry ~]# cat my.sh
#!/bin/bash
#
line_total=`cat 20080512.log|wc -l`
echo $line
line_num=1
while [ "$line_num" -le "$line_total" ]
do
file_name=`sed -n "$line_num"p 20080512.log`
tar -crvf 20080512.tar $file_name
line_num=`expr $line_num + 1`
done
[root@harry ~]#
阅读(758) | 评论(0) | 转发(0) |