statistics script for counting the result of more csv files 2
来源:互联网 发布:孕妇中期运动知乎 编辑:程序博客网 时间:2024/05/29 08:50
statistics script for counting the result of more csv files (revision1)
resultFile="./result.txt"
filepath="./scenario_name_uniq_2.txt"`cat ./*.csv > name.txt`
`awk -F "-" '{print $1,$NF}' name.txt > name1.txt`
`awk '{print $1,$NF}' name1.txt > name2.txt`
`sort name2.txt | uniq > scenario_name_uniq.txt`
`awk '{print $1}' scenario_name_uniq.txt > scenario_name_uniq_2.txt`
`sed -i 's/\[/\\\[/g' scenario_name_uniq_2.txt`
sleep 1
`sed -i 's/\]/\\\]/g' scenario_name_uniq_2.txt`
sleep 1
if [-f "$resultFile"];then
`rm result.txt`
fi
while read LINE
do
scenario_name=`echo $LINE |cut -d " " -f 1`
echo "scenario_name:"$scenario_name
scenario_name1=`echo "$scenario_name" |sed 's/\[/\\\[/g'`
echo "scenario_name1:"$scenario_name1
scenario_name2=`echo "$scenario_name1" |sed 's/\]/\\\]/g'`
echo "scenario_name2:"$scenario_name2
variable=" OK"
scenario_name_new=${scenario_name2}${variable}
echo "scenario_name_new:"$scenario_name_new
command="awk '/^$scenario_name_new$/' name2.txt | wc -l"
echo $command
size=`eval $command`
echo "size:" $size
`echo $size:pass scenario_name:$scenario_name >> result.txt`
done < $filepath
`rm name*.txt`
`rm scenario*.txt`
`sort result.txt | uniq > finalResult.txt`
`rm result.txt`
0 0
- statistics script for counting the result of more csv files
- statistics script for counting the result of more csv files 2
- shell script - usuage of the for loop
- 1613. For Fans of Statistics
- Bash Commands - $? for testing the result of a command
- state of the art result for machine learning problems
- the result of choice
- 5 More of the Best Icon Packs for Linux
- Result consisted of more than one row
- Result consisted of more than one row
- the diary of how to backup one more files in linux
- one or more files from the emulator for windows ce installation is missing 解决方法
- (转)one or more files from the emulator for windows ce installation is missing 解决方法
- vivado仿真出错: Please check the Tcl console or log files for more information.
- 论文 NaturalScene Statistics Account for the Representation of Scene Categoriesin Human Visual Cortex
- For The Love Of Ebooks More Ebooks And Even More Ebooks
- ural 1613. For Fans of Statistics
- Ural 1613. For Fans of Statistics
- 八数码问题可解性及扩展
- Java使用MyEclipse构建webService简单案例
- 看过的网页
- 有时候可用 UIWebView 代替 UITextView,解决行间距问题
- Oracle 11g 安装
- statistics script for counting the result of more csv files 2
- UILocalNotification的实例
- 在plsql中添加删除数据
- iOS的主要框架介绍
- 从eclipse导入工程到myeclipse,部署到tomcat根目录下的解决方案
- 一名靠谱的JavaScript程序员应备的素质
- PS模块 pspnr<->posid 的FM
- 苏格拉底与商鞅的生死异同
- 一个UWSGI的例子