I am trying to run a program using multiples interval as arguments. I am using a for loop in a shell script to do this. However, I only was capable of running this code step by step, as showed bellow. I would like to know if there is a way to run this command in a single command line. I just begin to learn the shell lenguage. I already tried some combineation of commands such as do and then, but withou sucess. Any kind of help is welcome.
Thank you,
for K in 1 $(seq 1 5000000 160000000)
> do
> J=$((K+5000000))
> impute2 -phase -m ../impute2_chr1.map -g ../CHR1_17_04_17.gz -int $K $J -Ne 20000 -o phasing_CHR1_${K}_${J}
> done