I have two directories with files in them.
dir_one contains files with names like :
10.recode.vcf.map
dir_two filename pattern looks like this:
genetic_map_GRCh37_chr10.txt
I wrote some R script which does something with the files. In order to run the script I have to run the following command:
Rscript interpolation.R 10.recode.vcf.mapgenetic_map_GRCh37_chr10.txt
Now I want to run this script 22 times, but I cannot figure out a way to match two files in different directories.
So far I only figured how to extract the common number from a filename:
for i in ./map_files/*
do
echo ${i} ${i} | cut -d'/' -f 3 | cut -d'.' -f 1
done
I am not sure what to do next... Can anyone advice?
map
andgenetic
in your script run string? You need to tell us more about the contents of the directories (dir_one
,dir_two
andmap_files
) and explain the pairing criteria before we can help.