June 2017
Beginner
502 pages
11h 26m
English
Well, redirecting the output of a process is not what an IPC means, but it can be used as such in an asynchronous way: have one process redirect its output to a file and have another one read from the same file later on; and this can be a way to exchange information between the two processes:
zarrelli:~$ myfile=”myfile.txt” ; touch "$myfile" ; echo "$myfile" > controller ; while read -r line; do tar cvzf $line.tgz $line ; done < controllermyfile.txt
In this example, we just stored a filename into a variable. We created the file with touch, and then stored the filename into the controller file. Once we had the filename into the controller file, we had it read line by line and each line was stored into the line variable. ...
Read now
Unlock full access