What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Bash process substitution lets a command that expects file arguments read the output of another command, or write its input to another command, without you creating a temporary file. You write <(list) to read a process’s output as if it were a file, or >(list) to write to a file-like name that feeds a process’s input. It is Bash shell syntax, not a kernel feature that every shell provides, and it needs system support for named pipes (FIFOs) or the /dev/fd method.
What the two forms do
The GNU Bash Reference Manual describes the construct this way: “The process list is run asynchronously, and its input or output appears as a filename.” In practice, Bash starts the commands inside the parentheses, and hands the command on the left a filename-like reference connected to them. Which direction the data travels depends on which form you use.
As an Amazon Associate I earn from qualifying purchases.
| Form | Direction | What the outer command sees | Typical use |
|---|---|---|---|
<(list) |
Output of list flows into the outer command |
A readable filename whose contents are list‘s standard output |
Giving a file-only tool the output of a generated stream |
>(list) |
Data written by the outer command flows into list |
A writable filename; anything written to it becomes list‘s standard input |
Sending one stream to a second process while the main command runs |
Read the table from the perspective of the command that receives the filename. With <(...), that command reads. With >(...), that command writes.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchThe no-space rule
The angle bracket must touch the opening parenthesis. <(sort names.txt) is process substitution. < (sort names.txt) is not: Bash parses the < as an input redirection, and the parenthesis that follows is no longer the construct you intended. Expect a syntax error or a result you did not plan for. The same rule applies to >(...).
#1 Best Overall
- Used Book in Good Condition
A worked comparison
The most common illustration is comparing the sorted contents of two files with a tool that accepts file operands, such as diff:
diff <(sort first.txt) <(sort second.txt)
Each <(...) runs its sort in the background and gives diff a filename to open. diff never sees an intermediate file on disk, and you do not have to name or clean up sorted_first.txt and sorted_second.txt yourself. The same pattern works with other file-oriented tools, such as comm or paste, when they accept file operands. This is an illustrative example of the documented data flow; the outcome depends on the contents of your files and your Bash version.
Writing into a process with >(...)
The output form is less common but works in the same way. The outer command writes to a filename, and the listed process reads that data as standard input. A short illustration using tee, which copies its input to every file operand it receives:
printf '%sn' alpha beta gamma | tee >(wc -l >&2) >/dev/null
Here tee writes the lines to the substitution, where wc -l counts them, and sends the copy on standard output to /dev/null. Because the listed process runs asynchronously, its output can appear after the main command finishes, which matters when you build pipelines that depend on ordering.
Why you may see a /dev/fd path
When you run echo <(true) you will typically see a path such as /dev/fd/63. This is the /dev/fd mechanism at work: the operating system exposes an open file descriptor under a path name, and Bash passes that path to the command. Other systems use a named pipe in a temporary location instead. The exact path is an implementation detail, so do not write scripts that depend on a particular number or location.
What your system must support
The Bash manual states that process substitution is available on systems that support named pipes (FIFOs) or the /dev/fd method of naming open files. On a typical modern Linux system with Bash, both are normally present. The constraint matters in a few specific situations:
- Other shells: Bash-specific syntax is not part of the POSIX shell language. A script that starts with
#!/bin/shon a system whereshis dash will fail on<(...). Use#!/usr/bin/env bashor#!/bin/bashand run the script with Bash explicitly. - Restricted or unusual environments: Some containers, chroots, or hardened systems may lack
/dev/fdor FIFO support. Test in the target environment rather than assuming availability. - Commands that require a seekable file: Tools that seek or reopen their input may behave differently when given a pipe-like reference rather than a regular file.
The manual does not provide a complete table of which shells, distributions, or container images support the feature, so verify on the system you deploy to.
Process substitution versus command substitution
Command substitution, written $(command), runs a command and replaces itself with its captured standard output, with trailing newlines removed. The result is a string value that you can assign to a variable or pass as an argument. Process substitution does not produce a string. It produces a filename connected to a running process. Choose command substitution when you need the text itself, and process substitution when the receiving command insists on a file operand.
Rank #4
Troubleshooting
- Syntax error near
(: Check for a space between<or>and(. - “/dev/fd: No such file or directory” or similar: The environment probably lacks
/dev/fd. Check withls -l /dev/fd. - Works in your terminal but fails in a script: The script is probably running under
shrather than Bash. Confirm the interpreter line and runbash script.shto test. - Output missing or out of order when using
>(...): The listed process runs asynchronously. Add an explicit wait or restructure the script if the outer command must finish its work only after the consumer has completed.
Further learning
Process substitution is one of several Bash features that reduce temporary files. A Bash scripting book or the Bash shell reference will cover it alongside pipes, redirections, and file descriptors, which together explain why the syntax behaves as it does.
The Bottom Line
Use <(command) when a file-only tool needs to read a command’s output, and >(command) when a command needs to write into another process. Keep the bracket attached to the parenthesis, run the script under Bash, and confirm that the target system supports FIFOs or /dev/fd.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




