Skip to main content
added 103 characters in body
Source Link

I am quite new to Unix and would like to convert a script I previously had in R. For this I have three different files (of equal lengths) with different variants of file names. I would like to iterate through all three files in a loop drawing for the same numberline by line taking one line from each time. However I wantam not sure how to do something like thisincorporate more than one variable into a for loop.

module load bbtools 

for i in fna and j in fna2 and k in fna.prefix; 
do 
rename.sh -Xmx20g in='in=",${i}," out=",${j}" prefix=",${k}"
done

Is there any way I can run this directly without calling on a R script?

I am quite new to Unix and would like to convert a script I previously had in R. For this I have three different files (of equal lengths). I would like to iterate through all three files in a loop drawing for the same number each time. I want to do something like this

for i in fna and j in fna2 and k in fna.prefix; 
do 
rename.sh -Xmx20g in=',${i}," out=",${j}" prefix=",${k}
done

Is there any way I can run this directly without calling on a R script?

I am quite new to Unix and would like to convert a script I previously had in R. For this I have three different files (of equal lengths) with different variants of file names. I would like to iterate through all three files line by line taking one line from each. However I am not sure how to incorporate more than one variable into a for loop.

module load bbtools 

for i in fna and j in fna2 and k in fna.prefix; 
do 
rename.sh -Xmx20g in=",${i}," out=",${j}" prefix=",${k}"
done

Is there any way I can run this directly without calling on a R script?

Post Undeleted by Anupama
Post Deleted by Anupama
Source Link

For loop drawing from multiple files

I am quite new to Unix and would like to convert a script I previously had in R. For this I have three different files (of equal lengths). I would like to iterate through all three files in a loop drawing for the same number each time. I want to do something like this

for i in fna and j in fna2 and k in fna.prefix; 
do 
rename.sh -Xmx20g in=',${i}," out=",${j}" prefix=",${k}
done

Is there any way I can run this directly without calling on a R script?