Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6997375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:16:33+00:00 2026-05-27T20:16:33+00:00

In cygwin, I am trying to setup a netcat proxy, as follows: The server

  • 0

In cygwin, I am trying to setup a netcat proxy, as follows:

  1. The server: in one terminal I am running

    nc -lp 6000
    
  2. The proxy: in a second terminal I am running the proxy (listening on 2000 and passing farther to 6000).

  3. The client: in a third terminal I am running

    nc localhost 2000
    

The test

Typing something in client should show up on server. Typing something in server, should show up on client.

Below is what I tried to do in the 2nd terminal:

  1. This one works fine:

    nc -lp 2000 <fifo | tee /dev/stderr | nc localhost 6000 >fifo
    

(where fifo was previously setup with “mkfifo fifo”)

  1. But… these do not work 🙁

    nc -lp 2000 <fifo | awk '{print}' | nc localhost 6000 >fifo
    nc -lp 2000 <fifo | awk -f my.awk | nc localhost 6000 >fifo
    nc -lp 2000 <fifo | awk -f my.awk - | nc localhost 6000 >fifo
    

(where my.awk contains just {print})

Please helppppppppppppppp!!!!!!!!
Thanks in advance,
Adrian.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:16:34+00:00Added an answer on May 27, 2026 at 8:16 pm

    The problem is due to buffering and there is no standard way to turn it off in awk. On some systems you can hack around it by calling fflush, for example:

    nc -lp 2000 <fifo | awk '{print}{fflush()}' | nc localhost 6000 >fifo
    

    Sadly this doesn’t always work depending on platform and awk version. You might consider using a different processor that allows you to disable buffering, such as Perl.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get an Apache server running on my Cygwin setup to follow
I'm trying to setup fastri (http://eigenclass.org/hiki/fastri) on emacs running on cygwin in windows. The
I am trying to setup a CruiseControl.net (version 1.4.4) server on a machine with
I'm trying to run ohai.bat os_version within cygwin on Windows Server 2003 R2, and
I'm trying to use rdebug with emacs and cygwin and I'm running into trouble.
I'm trying to push changes to my server through ssh on windows (cygwin) using
I am trying to run Cygwin, and I am running into some problems. I
I'm trying to install cygwin on my Windows 7 machine. I get the setup
I am trying to set up an automated build system on Windows using Cygwin.
I'm trying to use cygwin sqlplus to connect to a remote oracle installation located

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.