I need to create a script which checks if the user is connected to the server while being pinged.
(For example, I found a server that pings the user as soon as he tries to connect, even before the server has sent the Network name to the user).
I would like that the script will write the network name.
I used:
//scid 7 scon -at1 echo $!network
(Considering that the cid of the window that I'm working on is 7)
It does echoes the network name, but it write it in all the status windows (For example, if I have 6 status windows, then I will get the network name of the CID 7 in all of them).
I would like that the command will be executed only on CID 7 and only if its connected .
How can I do that?