I have some code that is used to analyse files, the code is setup to analyse 1 file at a time using the following command line input in the /home/john/Dropbox/PhD/MultiFOLDIA/ directory:
java MultiFOLDIA_IMODE1 complex.1.pdb /home/john/Dropbox/PhD/MultiFOLDIA/Poses/ T0868_T0869 /home/john/Dropbox/PhD/MultiFOLDIA/T0868_T0869_complex.1.pdb_IMODE1.txt > /home/john/Dropbox/PhD/MultiFOLDIA/MultiFOLDIA_IMODE1.log
I would like to run the command on every file in the /home/john/Dropbox/PhD/MultiFOLDIA/Poses/ directory and have tried using the following script:
#!/bin/bash
poses=(~/home/john/Dropbox/PhD/MultiFOLDIA/Poses/*)
for f in "${poses[@]}"; do
java MultiFOLDIA_IMODE1 "$f" /home/john/Dropbox/PhD/MultiFOLDIA/Poses/ T0868_T0869 /home/john/Dropbox/PhD/MultiFOLDIA/T0868_T0869_"$f"_IMODE1.txt > /home/john/Dropbox/PhD/MultiFOLDIA/MultiFOLDIA_IMODE1.log
done
It doesn't work and I think I am not understanding how to pull filenames from arrays and utilise them in this way.