I have an issue. I have a folder with many files and i need to execute a program on all combinations of 2 files among my files.
My linux bash script looks like this so far:
for ex in $(ls ${ex_folder}/${testset_folder} | sort -V ); do
#ex is the name of my current file
#I would like to do something like a nested loop where
# ex2 goes from ex to the end of the list $(ls ${ex_folder}/${testset_folder} | sort -V )
done
I'm new to bash, in other languages this would look something like:
for i in [0,N]
for j in [i,N]
#the combination would be i,j
My list of files looks like the following:
ex_10.1 ex_10.2 ex_10.3 ex_10.4 ex_10.5
And i want to execute a python program on all combinations of 2 files among these (so i execute my program 10 times)
Thank you in advance for your help!