Questions tagged [process-substitution]
Process substitution a form of inter-process communication that allows the input or output of a command to appear as a file (such as: `<(cmd)` or `>(cmd)`).
189 questions
3 votes
1 answer
450 views
Understanding file descriptors and pipes resulting from `cat <(<command>)`
I don't understand the following: $ cat <(sleep 60) & jobs -l [1] 63813 [1]+ 63813 Running cat <(sleep 60) & /proc/63799/fd$ ps --forest PID TTY TIME CMD ...
1 vote
1 answer
159 views
Use Zsh process substitution in place of mktemp
If you have Pandoc installed, the following script will retrieve its HTML template, write it into a temporary file, make some adjustments, and then pass this file as a parameter: template=$(mktemp ...
0 votes
1 answer
88 views
ffmpeg inside while loop with find unintentionally alters iteration variable
Can someone please explain to me what is happening here? This is what I have reduced my situation down to: # make 20 test gifs out of the same source file. for i in {1..20}; do cp -p ../some-random-...
0 votes
0 answers
128 views
docker build inline command fails with process substitution part
I am wondering why this docker build command fails: docker build -t inline_img -f <(cat `FROM node:12` ) . [+] Building 0.1s (2/2) FINISHED => ERROR [internal] load build definition from 11 ...
0 votes
0 answers
188 views
Redirect output to /dev/fd/x in POSIX script, where /dev/fd/x replaces process substitution
I have a would-be POSIX script that includes filtering the stderr output: exec <cmd> "$@" 2> >(grep -v "blih bluh blah") Redirection does not occur because process ...
2 votes
1 answer
308 views
Order of fd allocation in process substitution
Inspired by this answer https://security.stackexchange.com/a/166645 I am wondering the reason behind the weird ordering when I run these commands: root@6cb8704148bf:/usr/app# echo <(printf "...
0 votes
0 answers
20 views
process substitution for output: syntax error depending on how script is called [duplicate]
The following script results in error when called directly, but not when called with . ./test.sh: % cat test.sh echo "foo" | tee >(rev) % . ./process_subst_test.sh foo oof % ./...
0 votes
0 answers
477 views
Using Process Substitution in docker as input <(command)
Recently, I faced some problems in developing bash pipelines with docker. This regards to the use of process substitution [<()] as input for a specific docker command. I know that this is a problem ...