Re: F11: Bug in sh-4.0 source build-in command

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

 



Dario Lesca wrote:
> Il giorno lun, 03/08/2009 alle 20.55 +0200, Michal Schmidt ha
> scritto:
>> Not a bug. You're running bash in POSIX mode (probably you ran
>> "sh").  In POSIX mode the current directory is not searched by the
>> source command. This is documented in the manpage.
>
> IMHO, this is a Bug.

No, it's not a bug.  The bash-3.2 behavior was the bug.

> "source: usage: source filename [arguments]"
>
> The command "source" take a "file" (-f, 644) and not a "executable" (-x,
> 755), like do "ls fil", "cat file", "sh file, "awk file", and many other
> command.
>
> So, if I run "source file", source must use "file", like do other
> command.

The bash builtins(1) manpage states this fairly clearly:

    source filename [arguments]

        Read and execute commands from filename in the current shell
        environment and return the exit status of the last command
        executed from filename. If filename does not contain a slash,
        file names in PATH are used to find the directory containing
        filename. The file searched for in PATH need not be
        executable. When bash is not in posix mode, the current
        directory is searched if no file is found in PATH. If the
        sourcepath option to the shopt builtin command is turned off,
        the PATH is not searched.

Also see bash author Chet Ramey's recent reply on the bash list:

    http://lists.gnu.org/archive/html/bug-bash/2009-07/msg00024.html

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
No sense being pessimistic, it probably wouldn't work anyway

Attachment: pgpyfWMz6XDIW.pgp
Description: PGP signature

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux