Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm on Windows 7 Powershell and have ncat from

I'm trying to send "foo" to some network device

PS> ncat -u 6061

but it sends "foo\n" (66 6f 6f 0a) and the line-feed makes the device not recognize the command.

there's a -C option to add a carriage return, but that's no help.

I made a text file containing "foo" and did

PS> cat .\test.txt | ncat -u 6061

but that also adds CRLF

share|improve this question

2 Answers 2

What happens if you just pipe "foo" | ncat ...

Failing that, you might want to look at this:

Which seems to allow you to send messages over TCP.

share|improve this answer

in case someone comes along this question and is not working on Windows but rather on Linux, you might want to try this:

  • Use the "eof" key, Ctrl+D


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.