I'm trying to understand what causes the difference in these 2 constructs that I thought were functionally equivalent:

```
$ ( echo foo >&2 ) 2> >(sed 's/^/stderr: /') | sed 's/^/stdout: /'   
stdout: stderr: foo
$ ( echo foo >&2 ) 2> >(sed 's/^/stderr: /') > >(sed 's/^/stdout: /')
stderr: foo

```

EDIT: If I understood user1133275 right, he suggests that `>(sed 's/^/stdout: /')` is not run unless the subshell `( echo foo >&2 )` outputs to stdout. However, that would mean that the following:

```
$ ( echo foo >&2 ) 2> >(sed 's/^/stderr: /') > >(echo baz)   
baz
stderr: foo

```

should not display `baz`.

EDIT 2: Perhaps also of interest, sed doesn't output `stdout:` on empty input, even when piped:

```
$ sed 's/^/stdout: /' < /dev/null
$ printf "" | sed 's/^/stdout: /'
$

```