Skip to content

Instantly share code, notes, and snippets.

@g-eorge
Created January 8, 2014 17:26
Show Gist options
  • Save g-eorge/8320708 to your computer and use it in GitHub Desktop.
Save g-eorge/8320708 to your computer and use it in GitHub Desktop.
Send a directory of files to flume via netcat

Assuming flume is listening on 6666 and your data files are in ./sample-data

Example:

find ./sample-data -type f -exec ./ncsend.sh {} \;
#!/bin/bash
event=$(< "$1")
echo "$1"
echo "$event" | nc 127.0.0.1 6666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment