Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: x86_64-redhat-linux-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -O2 -g -pipe -m64 uname output: Linux stuxsh04 2.6.9-55.EL #1 Fri Apr 20 16:25:34 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux Machine Type: x86_64-redhat-linux-gnu
Bash Version: 3.0 Patch Level: 15 Release Status: release Description: My apologies for not using a newer bash version, but I do not have full control of my environment. A gnu.bash.bug post on 2006-06-20T12:05 -0000 titled "functions that use process substitution are not exported correctly" from author "Ittay Dror" has gone unanswered to date (that I can tell). I have the same problem. That usenet posting is the only relevant information I have found so far. Is this truly a bug for our version of bash? I highly suspect that it is, hence this email. Repeat-By: <SCREEN SCRAPE> $ cat func function func { while read stuff; do echo $stuff | grep nonsense done < <(ps -ef) echo Done func! return 0 } $ source func $ declare -fx func $ declare -F declare -fx func $ cat my.sh echo In our shell. func echo Done with shell. exit 0 $ ./my.sh bash: func: line 2: syntax error near unexpected token `(' bash: func: line 2: ` done <<(ps -ef);' bash: error importing function definition for `func' In our shell. ./my.sh: line 3: func: command not found Done with shell. </SCREEN SCRAPE> -- Jeffery Martin