On 08/11/2019 11:56 AM, Lee wrote:
On 8/11/19, David <bouncingc...@gmail.com> wrote:
On Mon, 12 Aug 2019 at 01:07, Stephen P. Molnar <s.mol...@sbcglobal.net>
wrote:
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
The form of that error message indicates that
the directory name attempted as a result of
this substitution
cd "${d}_apo-3k9b"
contains a carriage return (\r) character.
Here's a demonstration:
[david@kablamm junk]$ cd foo$'\r'foo
bash: cd: $'foo\rfoo': No such file or directory
The $'\r' in my input command is a carriage return
character.
Note the identical form of quoting in my error message
and your error message.
The $'foo\rfoo' in the error message is a carriage
return character between two strings 'foo'.
If the mysterious carriage return character is not
in your ligand.list file, then it must be in
your Run.ligand.list.sh file just before the underscore
in the line
cd "${d}_apo-3k9b"
Have a look at your script file using
'cat -v Run.ligand.list.sh'
The effect of cat -v is to show control characters.
If possible, use an editor that can show control characters.
If not available, you can edit that line in your script file in a way
that would remove an invisible character in the suspect position.
Or you could try doing
dos2unix ligand.list
dos2unix Run.ligand.list.sh
and see if that gets rid of the embedded \r
Lee
Thanks to all that shared their expertise.
#!/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
and dos2unix solved the problem!!!!!!
--
Stephen P. Molnar, Ph.D. Life is a fuzzy set
http://www.Molecular-Modeling.net Multivariate and stochastic
614.312.7528 (c)
Skype: smolnar1