
nc (for organizing interaction over TCP), stty (for turning off the echo when the key is pressed) and clear (for clearing the terminal) are used.#! ).sink.sh and put the executable bit on it. After this, the game can be safely launched (or not boldly - is there a malicious code in it?). To start the server, use the -serve :./sink.sh -serve./sink.sh localhostcoproc built-in command, coproc can create a coprocess and communicate with it after a couple of pipes, which I used to communicate with nc . If you are interested in details, type help coproc , or read the section “Coprocesses” in man bash .sed , etc., to replace the substring with another string, calculate the length of the string, etc. This also became a useful discovery for me. If you are interested in the details, I can suggest the name of the corresponding section in man bash : “Parameter Expansion”.Source: https://habr.com/ru/post/80122/
All Articles