Is it possible to listen to a port continuously?
I listen for incoming tcp notifications with following command
sudo nc -l -p 999
But as soon as notification arrives I have to restart listen with same command. Is it possible to listen to port without having to restart command when notifications arrives until user decides to abort listen?
while true; do nc -l -p 999; done
– Piperinesudo
, you have to usesudo sh -c 'while true; do nc -l -p 999; done'
– Piperine