Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

12
  • 2
    If I understood corretly, tldp.org/LDP/abs/html/process-sub.html#FTN.AEN18244 says process substitution creates temporary files, not named pipes. As far as I know named do not create temporary files. Writing to the pipe never involves writing to disk: stackoverflow.com/a/6977599/788700 Commented Dec 17, 2017 at 13:13
  • 1
    I know this answer is legit 'cause it uses the word grok :D Commented Nov 1, 2018 at 13:46
  • 4
    @Adobe you can confirm whether the temporary file process substitution produces is a named pipe with: [[ -p <(date) ]] && echo true. This produces true when I run it with bash 4.4 or 3.2. Commented Jan 28, 2019 at 19:56
  • 1
    Good answer, except "to a temporary file and then" … You mention that it is not really a temporary file it is a pipe. However is in not "and then". Because it is a pipe the command (cat in your example) can be started before the sub-commands are started (date in your example). Start order is not defined. Commented Feb 24, 2021 at 11:41
  • 3
    @ctrl-alt-delor I agree that wording isn't great, but I'm glossing over the implementation details of FIFOs. Technically it isn't a "file", but it is a FIFO node with a file system path and it does get created first, then other parts of the pipieline are run. The same is true of pipes, it just so happens that the FIFO they are given is a standard stream name. Happy to accept edits that keep the explanation simple and clear without actually saying anything wrong. Commented Feb 25, 2021 at 10:47