I am fresh programmer on shell script. i want to do some automation using nc command via shell scripting. I need to run certain command after connecting server with selected port using nc . server is listening on connected port. we can get prompt to pass content while running from terminal. but i need to pass content many times. So I made a shell file which is containing following code but response is not coming
#!/bin/bash
#test.sh
function nc_input {
echo "ABCD,R,1,5151670,512173140137353,01141456843,0"
}
nc_input | nc 10.200.16.223 7913
#!/bin/bash -xvso you can see what is happening? Is the script running at all?