Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- # to aid in cleanup when using Ctrl-C to exit strace
- trap "pkill -f -x 'nc -k -l -U $HOME/test.sock'; exit" SIGINT
- # Start listening for notifications
- nc -k -l -U $HOME/test.sock | \
- while read type message; do
- echo "$(echo -n $type | base64 -di -)" "$(echo -n $message | base64 -di -)" >> /tmp/msg
- done &
- read
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement