Linux Shell Scripting - bash: ELF command not found
Hello.!
I have a executable tbc stored at $HOME/abc/xyz/tbc.Now, if I try running the executable with ". $HOME/abc/xyz/tbc" or "source $HOME/abc/xyz/tbc", it gives a message:
bash: ELF : command not found
But if I first cd to $HOME/abc/xyz and then run"./tbc", it works just fine.
What's the issue here.?
Thanks.!
__________________
Life is as complicated as you say it is.
Advertisements. Register and be a member of the community to get rid of them.
Re: Linux Shell Scripting - bash: ELF command not found
The executable I am talking about is the Befunge Compiler.It can be found here.I compiled the C source file and am trying to the executable when it comes up with the error.
__________________
Life is as complicated as you say it is.
Re: Linux Shell Scripting - bash: ELF command not found
When you use source, you're asking the shell to interpret the file. When you try to source a binary executable, it'll try to interpret it and fail. Use source only on scripts which the shell can understand.
__________________
I didn't make the world, I only try to live in it.
http://lucentbeing.com
-- Sykora --
Re: Linux Shell Scripting - bash: ELF command not found
Quote:
Originally Posted by Sykora
When you use source, you're asking the shell to interpret the file. When you try to source a binary executable, it'll try to interpret it and fail. Use source only on scripts which the shell can understand.
But that doesn't explain why the executable works when I cd to it's directory and then source it.
__________________
Life is as complicated as you say it is.