Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

POSIX shell equivalent to <()

<(commands ...) in bash/zsh makes the output behavior as a file. Does a POSIX equivalent exist?

like image 556
Sandlayth Avatar asked Aug 05 '16 19:08

Sandlayth


People also ask

What is a POSIX compatible shell?

POSIX defines the application programming interface (API), along with Unix command line shells and utility interfaces. This ensure software compatibility with flavors of Unix and other operating systems. The POSIX shell is implemented for many UNIX like operating systems.

Is bash POSIX compatible?

You can use POSIX standard in many shells such as, dash , bash , ksh , mksh , yash , zsh , etc. You need to be aware that each shell has its own commands and options or different options top of the POSIX specification.

What is Posix shell script?

POSIX Shell is a command line shell for computer operating system which was introduced by IEEE Computer Society. POSIX stands for Portable Operating System Interface. POSIX Shell is based on the standard defined in Portable Operating System Interface (POSIX) – IEEE P1003.

Is bash a POSIX?

Although most commands do the same thing as sh. bash is not a POSIX compliant shell. It is a dialect of the POSIX shell language. Bash can run in a text window and allows the user to interpret commands to do various tasks.


1 Answers

mkfifo foo.fifo

## if your "commands" is multiple commands
# { commands ...; } >foo.fifo &

# otherwise, if it's just one
commands ... >foo.fifo &

something_else foo.fifo

is the closest available equivalent to

something_else <( commands ... )
like image 97
Charles Duffy Avatar answered Sep 28 '22 03:09

Charles Duffy