I want to use zsh's process substitution to create a temporary file that can then be read by another program. However, the file it generates has no file extension, so the program reading it refuses to continue.
This can be demonstrated by:
$ echo =(ls)
/tmp/zshmgIWvT
What I want to happen is it to produce a filename like /tmp/zshmgIWvT.wav
Can zsh do this?
tmp=\
mktemp -t XXXXXX.wav`; command1 > "$tmp"; command2 "$tmp"; rm "$tmp".
=(...)is not a *process* substitution like
<(...)or
>(...)for the simple fact you have to wait for the process to finish before reading or writing to that file. Compare
cat <(echo yes; sleep 1000)to
cat =(echo yes; sleep 1000)`. – Nov 18 '18 at 07:16