方法一:
#!/bin/bash
n=`more $1|wc -l`
x=1
while (( $x<=$n ))
do
a="$x"p
sed -n $a $1 >> $2
usleep 100
let x+=1
done
方法二:
#!/bin/bash
num=`more $1|wc -l`
x=1
while (( $x<=$num ))
do
awk '{if ( NR=='$x' ){print $0}}' $1 >> $2
usleep 100
let x+=1
done
阅读(543) | 评论(0) | 转发(0) |