I have a little shell script that simply starts up a Java program. It is installed somewhere deep in the hierarchy, so I don't want to add its containing folder too my path. So I put a symbolic link into /usr/bin
. But when I try to run it, I get:
-bash: /usr/bin/asadmin: cannot execute binary file
I checked the permissions, and both the symbolic link and the shell script are executable. What can I do about this?
asadmin
shell script. why does bash think it's a binary?#!/bin/sh
file asadmin
return (using the actual path for asadmin)?POSIX shell script text executable
#!/bin/bash^M
. If it is a binary, check if it is a x64 binary and that you are not running an x32/x86 OS (Not sure if there still is a 32 bit OS X version, but that would cause the same error).