#!/bin/bash
k=1
while [ $k -lt 6 ]
do
pre_1=`date +%Y%m%d -d -"$k"days`
pre_date1=`echo $pre_1|cut -c 1-8`
echo $pre_date1
t=0
t2=`cat /home/unicomlabs/*_bak5/done/datafiles/*_${pre_date1}.txt|wc -l`
echo $t2
while [ $t -lt $t2 ]
do
echo ",'097'" >> /home/unicomlabs/sfbm$k.txt
((t++))
done
paste /home/unicomlabs/*_bak5/done/datafiles/*_${pre_date1}.txt /home/unicomlabs/sfbm$k.txt >/home/unicomlabs/$k.txt
((k++))
#cat /dev/null > /home/unicomlabs/sfbm$k.txt
done