sed -n '/\/bd_cal/p' $1 > list
cp list list_growing
for j in 1 2 3 4
do
for i in `cat list`
do
sed -n '/\/bd_cal/p' $i > list_tmp
sed -n '/\/bd_cal/p' $i >> list_TMP
cat list_growing list_tmp > TMP
mv TMP list_growing
done
if [ -s list_TMP ];then
mv list_TMP list
else
break
fi
done
awk '{print "cp ",$i" ."}' list_growing | sh
######求教上面这句话什么意思
for i in `grep -l ^\/ *`
do
sed 's+/.*/++' $i > name_no_slash
mv name_no_slash $i
done
rm -f list list_tmp list_TMP list_growing
echo ""
cp list list_growing
for j in 1 2 3 4
do
for i in `cat list`
do
sed -n '/\/bd_cal/p' $i > list_tmp
sed -n '/\/bd_cal/p' $i >> list_TMP
cat list_growing list_tmp > TMP
mv TMP list_growing
done
if [ -s list_TMP ];then
mv list_TMP list
else
break
fi
done
awk '{print "cp ",$i" ."}' list_growing | sh
######求教上面这句话什么意思
for i in `grep -l ^\/ *`
do
sed 's+/.*/++' $i > name_no_slash
mv name_no_slash $i
done
rm -f list list_tmp list_TMP list_growing
echo ""