Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put file localization in bash loop #27

Open
caalo opened this issue Feb 27, 2024 · 0 comments
Open

Put file localization in bash loop #27

caalo opened this issue Feb 27, 2024 · 0 comments

Comments

@caalo
Copy link
Collaborator

caalo commented Feb 27, 2024

Suggestion by Ash to put file localization mv commands in a bash loop to have less redundancy in code.

       Yes, but unlike an array it has to be done by key, so it's a little goofy. This should do the trick:
ref_files=("~{refGenome.ref_fasta}" "~{refGenome.ref_fasta_index}" "~{refGenome.ref_dict}" "~{refGenome.ref_amb}" "~{refGenome.ref_ann}" "~{refGenome.ref_bwt}" "~{refGenome.ref_pac}" "~{refGenome.ref_sa}")
for ref_file in "${ref_files[@]}"
do 
    mv "$ref_file" .
done

Originally posted by @aofarrel in #18 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant