What Does the Less-than and Parentheses Syntax in Linux/Bash Signify?

You have seen "<(" in Linux. What does it do?

A command encapsulated in parens and having the "<" symbol on the left is a way to do process substitution.

Here is an example:

diff <(hostname -f) <(date)

The diff command can compare the results of two different commands. To read more about process substitution, see this posting: https://tldp.org/LDP/abs/html/process-sub.html

Leave a comment

Your email address will not be published. Required fields are marked *