I am attempting to create a minimal local listen server that takes an input request, pipes the input to a program and then returns the result of the command.
What I have at the moment is the program which works like
echo "input" | scriptProgram
output
And I am attempting to use netcat to act as a listen server like
ncat 127.0.0.1 -l 1234 -kv -e scriptProgram
And test its output by using another ncat a a client
echo "input" | ncat 127.0.0.1 1234 -v
ncat: Connected to 127.0.0.1:1234.
ncat: 6 bytes sent, 0 bytes received in 4.71 seconds.
And I don't see the output from the program on either terminal Can anyone tell me where I am going wrong, or have any advise?