I would like to execute a script on a batch of files all of which have .xml extension.
Inspired by previous posts, I tried the following:
for file in *.xml; do ./script.sh <"$file"; done
And
for i in $(\ls -d *.xml)
do
./script.sh -i /path/*.xml -d /output_folder $i
done
Both of these run the script many times but only on the first .xml file in that folder. So I end up with a dozen output files but all of them are file1.txt, file1.txt_1, file1.txt_2 etc. The loop stops randomly, sometimes after 3 iterations, sometimes after 28.
Any help would be appreciated, Thank you, TP
for f in /input_path/*.xml; do
./interproscan.sh -mode convert -f raw -i "$f" -d /output_path
done
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments