bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Command "": bug or feature?


From: Chet Ramey
Subject: Re: Command "": bug or feature?
Date: Mon, 9 Apr 2001 14:00:53 -0400

> I have GNU bash, version 2.03.0(1)-release (sparc-sun-solaris2.7).
> 
> Suppose the executable file /tmp/a.out exist. Then do:
> 
> # export PATH=/tmp/a.out:$PATH
> # ""
> 
> As a result, a.out is executed.
> 
> Is this a bug or a feature?

It's system-specific.  It depends on how the kernel handles pathnames
with trailing slashes passed as arguments to stat(2) and execve(2)
(the actual pathname that bash passes to those system calls with the
above example is /tmp/a.out/).

So far, I have found that Solaris and AIX 4.2 exhibit this behavior.
BSD/OS, FreeBSD, and Linux all report an error about the "" command
not being found.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]