Skip to content

Instantly share code, notes, and snippets.

@thwarted
Created November 19, 2014 05:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thwarted/888bda7a1d23b89f9517 to your computer and use it in GitHub Desktop.
Save thwarted/888bda7a1d23b89f9517 to your computer and use it in GitHub Desktop.
pipe-to-dgram
#!/bin/bash
exec 3> >( while /bin/true ; do socat -t0 -T0 -u STDIN UDP:172.28.128.3:8888 ; done )
while /bin/true; do
while read line; do
echo "$line"
echo "$line" >&3
sleep 0.1
done < /vagrant/testlog
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment