On 08/11/2019 10:39 AM, David wrote:
On Sun, 11 Aug 2019 at 23:18, Stephen P. Molnar <s.mol...@sbcglobal.net> wrote:
I am running an up-to-date installation of Buster on my Linux platform
and have run into a strange problem with a bash script.
[...]
for d in $(cat ligand.list)
This line is the problem, it is vulnerable to various kinds
of breakage and is therefore bad practice, see here:
http://mywiki.wooledge.org/DontReadLinesWithFor
Try this instead, it is the recommended practice and
it may well solve your \r issue:
#!/bin/bash
while IFS= read -r d
do
cd "${d}_apo-3k9b"
echo "${d}apo-3k9b"
echo "${d}apo-3k9b.dpf"
/home/comp/Apps/Autodock/autodock4 -p "${d}apo-3k9b.dpf" -l
"${d}apo-3k9b.dlg"
cd ..
done <ligand.list
Thanks for the suggestion.
However,
comp@AbNormal:~/Apps/Models/1-PhosphorusLigands/Acetylcholinesterases/3K9B/Results$
./Run.ligand.list.sh
./Run.ligand.list.sh: line 4: cd: $'Acetylcholine\r_apo-3k9b': No such
file or directory
apo-3k9boline
apo-3k9b.dpfe
apo-3k9b.dpfpps/Autodock/autodock4: can't find or open parameter file
Acetylcholine
/home/comp/Apps/Autodock/autodock4: Unsuccessful Completion.
Same problem.
Incidentally, there are no embedded characters in the ligand.list.
--
Stephen P. Molnar, Ph.D. Life is a fuzzy set
http://www.Molecular-Modeling.net Multivariate and stochastic
614.312.7528 (c)
Skype: smolnar1