# process substitution constructs that have caused problems in the past eval cat <(echo test1) eval "echo foo;cat" <(echo test2) unset f f=<(echo test3); cat "$f" unset f eval f=<(echo test4) "; cat \$f" unset f FN=$TMPDIR/bashtest-procsub-$$ cat >"$FN" </dev/null } f2(){ date >/dev/null cat $1 } cat <(echo hi) f1 <(echo bye) f2 <(echo l8r) unset -f f1 f2 moo() { ls -l "$1" >/dev/null; ls -l "$1" >/dev/null; }; moo >(true) moo() { ls -al "$1" >/dev/null; (true); ls -al "$1" >/dev/null; }; moo >(true) unset -f moo bug() { c=$(ulimit -n) let c+=100 while let c-- do while read -ru3 x do echo -n : done 3< <(echo x) done echo } bug unset -f bug count_lines() { wc -l < $1 wc -l < $1 wc -l < $1 true | wc -l < $1 wc -l < $1 } echo intern count_lines <(date) unset -f count_lines echo extern FN=$TMPDIR/bashtest-$$ cat >$FN <