As far as I know, you can have the ability to make pipes between applications, such as this one:$ step1 < input_file | step2 | step3 > result_fileAnd you can access devices such as /dev/urandom, /dev/zero. /dev/null, etc:$ cat /dev/urandom > output_file$ someprog > /dev/nullMy question is, is it possible to make a pipe with a block device both input and output at the same time? For example, I want to read a input_file, send to /dev/example (which is rw), and then read its output into output_file. Can be achieved on a single command just like this:$ cat input_file | /dev/example > output_fileor$ /dev/example < input_file > output_fileor is it advised to do in two commands? PS: Maybe I'm misspelling the commands or making syntax errors, please let me know how to get it. I use sh or bash, I don't know how to use other consoles. If I'm not clear, let me know as English is not my mother tongue.
Pipe chain with devices
pipe;block device
What you wrote makes no sense: /dev/example is a file, not a program or a pipe. If you write data to a device, it doesn't go through the device and out to another program.For example, data written to /dev/audio is played on loudspeakers. If you read data from /dev/audio, you get data recorded on the microphone. There's no relationship between what is played on the loudspeakers and what is recorded with the microphone.