framefile=$1
#v0_1.frame
universefile=$2
#v0_1.tsl.universe
category=$3
#gzip_v01_c1.txt
key=$4
#[1-3].[1-3].0.*.[0-9].*.0.[1-4].[1-3].[0-4].2.1.1.1
###step1.识别符合要求的测试用例编号 并保存成number.txt
find $framefile -exec grep "Key = $key" {} \; >orinumber.txt
#find v0_1.frame -print -exec grep "Key = [1-3].[1-3].0.*.[0-9].*.0.[1-4].[1-3].[0-4].2.1.1.1" {} \; >orinumber.txt
awk '{print $3}' orinumber.txt>number.txt
###step2.提取对应行数的内容 并保存到category中
#python ordernum.py number.txt #文件中数字已经依照顺序排列了
rm -f $category
touch $category
while read line
do
export i=`echo $line` #注意是'~'符号下的`符号,而不是单引号
#提取每一行的数字
sed -n ''$i'p' $universefile > x.txt #将行数为该数字的内容输出到x.txt
#sed -n ''$i'p' v0_1.tsl.universe > x.txt
cat x.txt>> $category #将内容追加到测试用例分类文件中
#cat x.txt>> gzip_v01_c1.txt
done < number.txt
#v0_1.frame
universefile=$2
#v0_1.tsl.universe
category=$3
#gzip_v01_c1.txt
key=$4
#[1-3].[1-3].0.*.[0-9].*.0.[1-4].[1-3].[0-4].2.1.1.1
###step1.识别符合要求的测试用例编号 并保存成number.txt
find $framefile -exec grep "Key = $key" {} \; >orinumber.txt
#find v0_1.frame -print -exec grep "Key = [1-3].[1-3].0.*.[0-9].*.0.[1-4].[1-3].[0-4].2.1.1.1" {} \; >orinumber.txt
awk '{print $3}' orinumber.txt>number.txt
###step2.提取对应行数的内容 并保存到category中
#python ordernum.py number.txt #文件中数字已经依照顺序排列了
rm -f $category
touch $category
while read line
do
export i=`echo $line` #注意是'~'符号下的`符号,而不是单引号
#提取每一行的数字
sed -n ''$i'p' $universefile > x.txt #将行数为该数字的内容输出到x.txt
#sed -n ''$i'p' v0_1.tsl.universe > x.txt
cat x.txt>> $category #将内容追加到测试用例分类文件中
#cat x.txt>> gzip_v01_c1.txt
done < number.txt