2 Star 0 Fork 0

Guojie Luo / engineering-village

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
filter.sh 2.07 KB
一键复制 编辑 原始数据 按行查看 历史
Guojie Luo 提交于 2017-11-02 12:10 . Add example inputs
#!/bin/bash
count=`cd results; ls -1 *.csv | wc | awk '{print $1}'`
name="A Ai An Ang Ao Ba Bai Ban Bang Bao Bei Ben Beng Bi Bian Biao Bie Bin Bing Bo Bu Ca Cai Can Cang Cao Ce Cen Ceng Cha Chai Chan Chang Chao Che Chen Cheng Chi Chong Chou Chu Chuai Chuan Chuang Chui Chun Chuo Ci Cong Cou Cu Cuan Cui Cun Cuo Da Dai Dan Dang Dao De Dei Den Deng Di Dian Diao Die Ding Diu Dong Dou Du Duan Dui Dun Duo E En Er Fa Fan Fang Fei Fen Feng Fo Fou Fu Ga Gai Gan Gang Gao Ge Gei Gen Geng Gong Gou Gu Gua Guai Guan Guang Gui Gun Guo Ha Hai Han Hang Hao He Hei Hen Heng Hong Hou Hu Hua Huai Huan Huang Hui Hun Huo Jan Ji Jia Jian Jiang Jiao Jie Jin Jing Jiong Jiu Ju Juan Jue Jun Ka Kai Kan Kang Kao Ke Ken Keng Kong Kou Ku Kua Kuai Kuan Kuang Kui Kun Kuo La Lai Lan Lang Lao Le Lei Leng Li Lia Lian Liang Liao Lie Lin Ling Liu Long Lou Lu Luan Lue Lun Luo Ma Mai Man Mand Mang Mao Me Mei Men Meng Mi Mian Miao Mie Min Ming Miu Mo Mou Mu Na Nai Nan Nang Nao Ne Nei Nen Neng Ni Nian Niang Niao Nie Nin Ning Niu Nong Nou Nu Nuan Nue Nun Nuo O Ou Pa Pai Pan Pang Pao Pei Pen Peng Pi Pian Piao Pie Pin Ping Po Pou Pu Qi Qia Qian Qiang Qiao Qie Qin Qing Qiong Qiu Qu Quan Que Qun Ran Rang Rao Re Ren Reng Ri Rong Rou Ru Ruan Rui Run Ruo Sa Sai San Sang Sao Se Sen Seng Sha Shai Shan Shang Shao She Shei Shen Sheng Shi Shou Shu Shua Shuai Shuan Shuang Shui Shun Shuo Si Song Sou Su Suan Sui Sun Suo Ta Tai Tan Tang Tao Te Teng Ti Tian Tiao Tie Ting Tong Tou Tu Tuan Tui Tun Tuo Wa Wai Wan Wang Wei Wen Weng Wo Wu Xi Xia Xian Xiang Xiao Xie Xin Xing Xiong Xiu Xu Xuan Xue Xun Ya Yai Yan Yang Yao Ye Yi Yin Ying Yo Yong You Yu Yuan Yue Yun Za Zai Zan Zang Zao Ze Zei Zen Zeng Zha Zhai Zhan Zhang Zhao Zhe Zhei Zhen Zheng Zhi Zhong Zhou Zhu Zhua Zhuai Zhuan Zhuang Zhui Zhun Zhuo Zi Zong Zou Zu Zuan Zui Zun Zuo"
src_dir=results
dst_dir=filtered
mkdir -p $dst_dir
for i in `seq 1 $count` ; do
venue=`cd results; ls -1 *.csv | head -n $i | tail -n 1 | awk -F . '{print $1}'`
echo $venue ...
rm -f $dst_dir/"${venue}.csv"
for n in $name ; do
grep ",1,\"$n," "$src_dir/${venue}.csv" >> "$dst_dir/${venue}.csv"
done
done
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lowerbound/engineering-village.git
git@gitee.com:lowerbound/engineering-village.git
lowerbound
engineering-village
engineering-village
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891