That's because eagle
is a compiled executable, not a bash script. You are getting confused because you often see bash ./script
suggested as a way of running the bash script saved in the text file script
. For example:
$ cat foo.sh
echo "hello!"
$ bash ./foo.sh
hello!
So, the command bash ./foo.sh
actually means "run bash
and ask it to execute the commands found in the file foo.sh
". However, binary executables are not shell scripts, they are not a list of simple commands and cannot be run that way. For example, if you try to run the ls
binary using bash
:
$ bash /bin/ls
/bin/ls: /bin/ls: cannot execute binary file
That's bash
telling you it can't run this thing you told it to run because it is a binary file and not a text file containing a script.
So, to fix your problem, just remove the bash
from your alias and, instead, point it to the actual location of the eagle
executable:
alias eagle='/home/metin/eagle-7.6.0/bin/eagle'
Alternatively, add /home/metin/eagle-7.6.0/bin/
to your $PATH
by adding this line to your ~/.bashrc
:
PATH="$PATH:/home/metin/eagle-7.6.0/bin/"
That will let you execute any executable files in /home/metin/eagle-7.6.0/bin/
by name (by running eagle
in this case) just like you do with any other executables such as bash
itself, or ls
.
eagle
is a binary rather than a script, so runningbash eagle
doesn't make sense./eagle
is more comfortable than to typebash eagle
bash eagle
would help?bash
from your alias