In this recipe, we use a concept called file-in-file-out (FIFO), also known as pipes, to pass along a parameter to several "worker" scripts. These workers operate in parallel (in other words, mostly independent of the master process), read an input, and execute a command. FIFOS are useful because they can reduce file system activities or input/output (IO), and data can flow directly to listeners or recipients. They are represented on the file system as files and are bidirectional—they can be read and written to at the same time.
To create FIFOs, we use the mkinfo
command to create what appears to be a file (everything is a file in Linux). This file has a special property, though, which is different than normal files and also different from the pipes we had been previously using: the pipes, in this case, can allow for multiple readers and writers!
As with any file, you can also provide permissions using the ...