I am trying to write a for to extract the values of MQ from a VCF files and then create a new files with .tmp extension.
for i in $(find -name "*.vcf") do echo $i filename=${i%.p*} echo $filename egrep -o "MQ=[[:digit:]]{,3}..{2}?" $i > ${filename}.tmp done While it creates files with the appropriate names, the content of all the *.tmp files are the same. What am I doing wrong?
没有评论:
发表评论