Skip to content

nice bash trick - how to send data over the net only with bash interna

Quite some time ago I found a real cool bash trick in a forum, that I didn't know. And when it's written here, it will help you and it will help me to find it again (if I forget it ;-) ).

You can easily make a network connection and send data through it with this:

cat file.txt > /dev/tcp/

This will send data to thie ip to the port 1337 with tcp. I tested it with netcat and it works fine. Until I have seen this, I usually worked with netcat. But with this little trick, I don't need netcat on every machine I use to send data.


No Trackbacks


Display comments as Linear | Threaded

No comments

The author does not allow comments to this entry

Add Comment

Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
Form options

Submitted comments will be subject to moderation before being displayed.