Send String over netcat connection
Create file test.txt
, content of file is 1
netcat [ip-address] [port] <test.txt
At destination you must have something to listen to this.
Try this:
echo -n 'Line of text' | nc <ip> <port>
You can also use temp file syntax:
cat <(echo "Line of test") | nc <ip> <port>