On 1/26/2018 9:15 AM, Denys Vlasenko wrote:
On Fri, Jan 26, 2018 at 9:34 AM, Paul Otto <[email protected]> wrote:
According to the BASH documentation, the source command should:
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, filenames  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.
I wish bash wouldn't introduce gratuitous standard violations.

But wow, learn something every day... I never knew 'source' searched PATH at all.  I thought it just loaded a file with the same semantics as 'open()'.

This would be the danger of learning by example instead of reading the manual.

-Mike
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to