File descriptor permission denied with bash process substitution? File descriptor permission denied with bash process substitution? bash bash

File descriptor permission denied with bash process substitution?


You have a typo; use exec 3> >( gnuplot ) instead of exec >3 >( gnuplot ).

BTW, yes it's expected. exec >3 >( gnuplot ) redirects stdout to a file named 3, then tries to execute >( gnuplot ) (which translates to /dev/fd/63) as a program.


I was getting:

/dev/fd/63: Permission denied

with process substitution due to use of sudo as noted here.

So don't do that:

$ sudo ruby <(echo "puts 'foo'")ruby: Bad file descriptor -- /dev/fd/63 (LoadError)