I found this command at Quick way to find if a port is open on Linux.
exec 6<>/dev/tcp/127.0.0.1/445 || echo "No one is listening!"
I am a newbie to shell scripting. Could anyone please explain me in detail the syntax of this command?
Especially exec 6<>/dev/tcp/127.0.0.1/445
. Also is exec going to return a bool value or something (since ||
is being used?)
Thanks a lot.