On Mon, Aug 08, 2005 at 07:59:28PM +0400, Alex V Breger wrote: > 'source' and '.' is two names of one builtin. > As reffered in bash(1): > source filename [arguments] > .... If filename does not contain a slash, file > names in PATH are used to find the directory containing file- > name. The file searched for in PATH need not be executable. > > But we have > [EMAIL PROTECTED]:~$ ls -l `which file` > -rwxr-xr-x 1 root root 10088 2004-12-06 12:55 /usr/bin/file > > This error message is produced with: > [EMAIL PROTECTED]:~$ . `which file` > bash: ELF: command not found > > As result there are two bugs: > 1) source builtin must produce better error messages ( try to start > 'bash /usr/bin/file', its message is better ) Separate bug, I guess.
> 2) source builtin does not work correctly with search of > non-executable files in $PATH What file is nonexecutable? The problem with source /usr/bin/file is that bash is trying to interpret the ELF binary as commands, the same way it interprets user input. If you copy and paste the hex bytes, you will also get "ELF, command not found". (Agree here that the message could be more informative). The magic number ELF is at offset 2, I guess, the first 2 bytes being checked for the string "#!". I just closed the bug, reopen if you've got something I've missed. Justin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

