Shell - Parallel

Bash Liste Des Attaques Ovh

About

Shell commands are executed in parallel in pipelines if no stdin is connected between them.

Why ? Because each command in a pipeline is executed as a separate process (i.e., in its own subshell).

Proof

Without stdin, in parallel

sleep 3 | echo "Hello world."

With Stdin, they will not be executed in parallel

sleep 3 | echo "Hello World $(</dev/stdin)"

Documentation / Reference





Discover More
Bash Liste Des Attaques Ovh
Bash - Pipeline

This article talks the syntax of a Shell Pipeline in Bash All command(s) in a pipeline are executed: in parallel (if there is no stdin connected between them) and started in a subshell list ...



Share this page:
Follow us:
Task Runner