1
我正在使用OS X El Capitan V10.11.3。如何在Bash中创建一个循环来搜索一组.gz文件
我能够获得与测试文件一起使用的语法,但在一组.gz文件中使用它却很困难。
他的工作是测试文件:
#!/bin/bash
while read p; do
grep $p test2.txt>> final.txt
done <test3.txt
我试图写一个循环来搜索在“test3.txt”文件中使用的SNP清单超过30 .gz文件解
#!/bin/bash
while read p; do
grep $p zcat chunk?-chr*.imputed.info.gz >> Final.txt
done <test3.txt
。
的test3.txt文件具有在.gz文件解代表1个SNP。当我运行上面的语法会创建一个文件proxy_imputed.txt,但不拉SNP。
有什么想法?
请看看[editing-help](http://stackoverflow.com/editing-help)。 – Cyrus