Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#15606 - [bash] Dot command does not work as expected with /bin/sh
Attached to Project:
Arch Linux
Opened by Patrick McCarty (pnorcks) - Monday, 20 July 2009, 21:00 GMT
Last edited by Allan McRae (Allan) - Monday, 20 July 2009, 22:55 GMT
Opened by Patrick McCarty (pnorcks) - Monday, 20 July 2009, 21:00 GMT
Last edited by Allan McRae (Allan) - Monday, 20 July 2009, 22:55 GMT
|
DetailsDescription:
With Bash 4.0-024, I am running into difficulties running a simple shell script with /bin/sh. Additional info: bash 4.0.024-1 (x86_64) Steps to reproduce: Create test.sh, and execute this simple command sequence: bash-4.0$ cat test.sh #!/bin/sh echo Hello bash-4.0$ . test.sh Hello bash-4.0$ sh sh-4.0$ . test.sh sh: .: test.sh: file not found |
This task depends upon
Anyway the old bash 3.2 does the same here.
complete text:
. filename [arguments]
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. If any arguments are supplied, they become
the positional parameters when filename is executed. Otherwise the positional parameters are unchanged. The return status is the status
of the last command exited within the script (0 if no commands are executed), and false if filename is not found or cannot be read.
The behavior of the dot command in Bash 4.0 is now POSIX compliant, whereas in Bash 3.2, it was not.
I thought this was a regression from Bash 3.2, but I guess not. Thanks for the tip.