![]() |
![]()
| ![]() |
![]()
NAMEpsub - perform process substitution SYNOPSISCOMMAND1 ( COMMAND2 | psub [-F | --fifo] [-f | --file] [(-s | --suffix) SUFFIX] ) DESCRIPTIONSome shells (e.g., ksh, bash) feature a syntax that is a mix between command substitution and piping, called process substitution. It is used to send the output of a command into the calling command, much like command substitution, but with the difference that the output is not sent through commandline arguments but through a named pipe, with the filename of the named pipe sent as an argument to the calling program. psub combined with a regular command substitution provides the same functionality. The following options are available:
EXAMPLEdiff (sort a.txt | psub) (sort b.txt | psub) # shows the difference between the sorted versions of files ``a.txt`` and ``b.txt``. source-highlight -f esc (cpp main.c | psub -f -s .c) # highlights ``main.c`` after preprocessing as a C source. COPYRIGHT2024, fish-shell developers
|