I recently replaced adoptopenjdk-13 with adoptopenjdk-16. I have a script file that uses the tool by name, so I changed it from 13 to 16. Its new contents:
#!/bin/bash
if [ -z ${JAVA_OPTS+x} ]
then
# Set some defaults
JAVA_OPTS=""
fi
/Library/Java/JavaVirtualMachines/adoptopenjdk-16.jdk/Contents/Home/bin/java $JAVA_OPTS -jar $CROMWELL_HOME/womtool.jar "$@"
me $ which bash
/bin/bash
me $ ll /usr/local/cromwell
total 16
drwxr-xr-x 6 root wheel 192B Sep 27 12:43 ./
drwxr-xr-x 23 root wheel 736B Nov 10 2020 ../
-rwxr-xr-x@ 1 root wheel 210B Sep 27 12:42 cromwell*
lrwxr-xr-x 1 root wheel 39B Jul 14 15:14 cromwell.jar
-rwxr-xr-x@ 1 root wheel 208B Sep 27 12:41 womtool*
lrwxr-xr-x 1 root wheel 38B Jul 14 15:14 womtool.jar
m082166@me $ $CROMWELL_HOME/womtool validate MyWDL.wdl
-bash: /usr/local/cromwell/womtool: /bin/bash: bad interpreter: Operation not permitted
me $ /Library/Java/JavaVirtualMachines/adoptopenjdk-16.jdk/Contents/Home/bin/java $JAVA_OPTS -jar $CROMWELL_HOME/womtool.jar validate MyWDL.wdl
Success!
Why is bash refusing to let me run the script, when running the contents of the script is perfectly fine? This literally just broke after I updated the script file to point to the correct tool
head -1 /usr/local/cromwell/womtoll | od -c
contain a\r
character?