Steps to Reproduce: $ bash -ec 'cat <(echo echo 1)' echo 1 $ bash -ec '. <(echo echo 1)' $ bash -exc '. <(echo echo 1)' + . /dev/fd/63 $ ++ echo echo 1 Note that my command prompt is screwed in the last case, i.e. bash exited before the process substitution was finished. Expected Results: 1
Same happens with bash-3.0
Same with bash-3.1.1. Here is an explanation: $ strace -e trace=file,desc bash -ec '. <(echo echo 1)' [...] stat64("/dev/fd/63", {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 open("/dev/fd/63", O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 read(3, "", 0) = 0 close(3) = 0
From Chet Ramey answer: "The bash source builtin only works with regular files. This is a limitation that will someday be lifted." http://lists.gnu.org/archive/html/bug-bash/2006-01/msg00018.html