Red Hat Bugzilla – Bug 495772
"source" broken in sh
Last modified: 2014-01-12 19:08:56 EST
Description of problem:
The "source" builtin (as well as ".") seems to be broken and fails to find files in sh mode.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a file called x.sh with the following two lines:
2. Observe that with bash, the following command works:
$ source x.sh
3. Run sh, and try again:
sh-4.0$ source x.sh
sh: source: x.sh: file not found
But the file is right there:
sh-4.0$ ls x.sh
Ping? This is failing rebuild of preload in rawhide.
I think this should be a F11 blocker.
Ok, seems like bash 4's manual explains the behavior:
Read and execute commands from the FILENAME argument in the
current shell context. If FILENAME does not contain a slash, the
`PATH' variable is used to find FILENAME. When Bash is not in
POSIX mode, the current directory is searched if FILENAME is not
found in `$PATH'. If any ARGUMENTS are supplied, they become the