'3 files have to run through a workflow, but need to be renamed before

I've got a quite complex nextflow pipeline that uses a file.csv as input I need to run this pipeline and the same big datas, but with three different input files that are named file.part1.csv, file.part2.csv and file.part3.csv

My command is like : nextflow -i file.csv So I need to rename the first one, launch the script, then proceed with 2nd then third file How would you proceed in a bash script, I'm not so strong in bash.. Thanks a lot for your help



Solution 1:[1]

I think I solved that with :

find . -type f \( -iname "*.csv" ! -iname "file.csv" \)|while read fname; do
 echo "$fname"
 cp "$fname" file.csv
 nextflow -i file.csv
done

Will give a try !

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Benoit