Last active
January 6, 2023 10:53
-
-
Save 0xlkda/287359453691ae94a9f5e96ffb244394 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# process 1: | |
$ mkdir /tmp/anything # create entry | |
$ exec 42> /tmp/anything/42 # open write on 42 | |
$ echo "message here" >&42 # write message to 42 | |
$ exec 42>&- # close write 42 | |
# process 2: | |
$ exec 42< /tmp/anything/42 # open read on 42 | |
$ cat <&42 # read from 42 and pipe to cat | |
$ message here | |
$ exec 42<&- # close read 42 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment