I'm having a discussion with my Operating Systems teacher about whether shell program can be used to communicate with another process. He says it can't while I believe it actually can.
For example: if we write echo "123" >> file.txt, and there is a process named P1 that reads data from this file, isn't it communication between those two processes?
Another example: There is a process P1 that waits for a file to be created in order to proceed. If we create that file by using touch file.txt, isn't it also considered as communication?
Is my teacher really right? If so, could someone please explain to me why? He gave me some examples about how can a process communicate with one another, such as: shared memory area, pipes or signals.
cat file | programUsingFile.. the shell links them up but they are doing the communication .. OR you have something running in the shell connecting to a remote process. For instance TCL or Expect allow you to do interactive dialogs (say to do password entry on login)..netcatin one Terminal like thisnc -u -l 3000and in another Terminal/process you run thisecho "Told you so" > /dev/udp/127.0.0.1/3000You should become an A* pupil ;-)coprocis, if it isn't 'Inter-process Communication" gnu.org/software/bash/manual/html_node/Coprocesses.html