help on network communication


 
Thread Tools Search this Thread
Operating Systems Solaris help on network communication
# 1  
Old 05-11-2007
Question help on network communication

Hi,

Can anyone suggest a Unix command or c-shell algorithm to simulate to behavior of "wall" command minus the "all users"? What I'm trying to do is to send a notice to just one particular user but i dont want other remotely-logged-on users to receive the message (on the pseudo-terminals). I cannot use the "write" command for three reasons:
1. I (sender) will not be typing the message from standard input (instead, i will be using a file input)
2. I (sender) is not logged in to the same host as the receiver.
3. I want the message to appear on all terminals of the intended receiver.

Thanks in advance for your ideas...
# 2  
Old 05-11-2007
ok... as root, i will send a message to the user "pressy" on all of his terminals...


Code:
root@mp-wst01 # who
pressy     pts/1        May 11 09:51    (pressynb.ips.local)
pressy     pts/2        May 11 09:51    (pressynb.ips.local)
root       pts/3        May 11 09:51    (pressynb.ips.local)
root@mp-wst01 # who | awk '$1~/pressy/ {print $2}' | while read PTS; do print "\nALERT!\n" > /dev/$PTS; done
root@mp-wst01 #



regards pressy
# 3  
Old 05-11-2007
pressy what shell are you using? I get a while expression syntax and undefined variable pts.

also, im afraid your code requires me to be logged in to the same host as the receiver.....
# 4  
Old 05-11-2007
Quote:
pressy what shell are you using? I get a while expression syntax and undefined variable pts.
i am working in the korn shell (standard /usr/bin/ksh, Version M-11/16/88i), seems that you are using CSH... no clue how it works there....

Quote:
also, im afraid your code requires me to be logged in to the same host as the receiver.....
well, you could create a script for that, save it somewhere and execute it from remote, for example with ssh root@mp-wst01 -C "/root/message.sh". but yes, for the message itself you will need to execute a command on the remote host...
to find a remote logged in user, i could think about finger:
Code:
root@jumpy # finger pressy@mp-wst01
[mp-wst01]
Login       Name               TTY         Idle    When    Where
pressy          ???            pts/2          8 Fri 17:20  pressynb.ips.local
root@jumpy #

but to send him a message directly, hmm, good question... any ideas mates?

regards PRESSY
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Interprocess Communication

Hiya Everybody just joined, Not sure if this is the right section:o I require abit of an assistance with IPC! I know there are different types of IPC porcesses like signals, semaphores, mutexes, shared memory, message queues, pipes and sockets. Now say a system has a number of... (4 Replies)
Discussion started by: G.I.Joe
4 Replies

2. Cybersecurity

Communication over firewall

Hey GUys, Once again I run in to problem and I am here for ur help. I have two sun(solaris) box on company LAN. One Unix Box is behind the firewall and the other one is Outside the firewall. The thing i need to do is remote display a graphic on Unix box outside the firewall to the Unixbox... (5 Replies)
Discussion started by: ajnabi
5 Replies

3. AIX

communication problems

hello i'v two aix servers 4.3. last night the goes down becuse electrical f problems. when the servers comes up i've notice that file /unix is gone. i've fix it and the problem fixed. after few hours the same crash becuse elctrical problems. file /unix is there , but now i've a... (0 Replies)
Discussion started by: ariec
0 Replies

4. HP-UX

Communication Failures

HI ALL, I have been trying to install a particular software using remote linux server. some thing like this: rsh <host ID> /usr/sbin/swinstall -x autoreboot=true -s /tmp/<software> <Product name>. The problem is whenever I try to install the product through a shell script the installation... (1 Reply)
Discussion started by: barun agarwal
1 Replies

5. IP Networking

ip communication through serial connection

I have serial modem connection between two computers. We have to login the remote computer through ip address. How can I get the ip address in this connection? (1 Reply)
Discussion started by: pcsaji
1 Replies

6. UNIX for Advanced & Expert Users

Pipe, interprocess communication

Earlier I posted a question regarding this issue. I managed to go a step further. Anyway, this is another similar question Write a programme that creates a ring of three processes connected by pipes. The first process should prompt the user for a string and then send it to the second process .... (2 Replies)
Discussion started by: scmay
2 Replies

7. UNIX for Dummies Questions & Answers

serial communication

This isn't really a unix question, or even a programming question, but I hope you guys can help. I want to create a program to control the electricity on a model railway. I have created the program to that it sends characters over the serial cable, but now I need to do the switch that will... (1 Reply)
Discussion started by: KrazyGuyPaul
1 Replies
Login or Register to Ask a Question