The following works:
Code: Select all
cat <(echo a)
However, the following procuces an error:
Code: Select all
set -- <(echo a)
[root@Dpupbuster ~] $ cat $1
cat: /dev/fd/63: No such file or directory
Why? Are there any workarounds? The closes, that I think of is a named pipe, which in my opinion isn't really process subsitution and requires an extra line (or two) of code and something almost like a temporary file.
Some info on process substition:
https://tldp.org/LDP/abs/html/process-sub.html
BTW, I see now file called "/dev/fd/63". Does the collowign code, "cat <(echo a)" briefly create such a file descriptor or should I create it?