Need to write messages to Multilple users


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Need to write messages to Multilple users
# 1  
Old 11-07-2006
Need to write messages to Multilple users

hi,

I need to send a message to multiple users to all there logged on terminals

i tried write but its send to only one user and only one terminal

i cant use wall command because all the people in group should not receive the message
# 2  
Old 11-07-2006
Type who to find out which terminals you want to write to, then, as root...

echo "Some message here" | tee /dev/pts/1 /dev/pts/2 /dev/pts/3

Not elegant, but it'll do the job

Cheers
ZB
# 3  
Old 11-08-2006
Quote:
Originally Posted by pbsrinivas
hi,

I need to send a message to multiple users to all there logged on terminals

i tried write but its send to only one user and only one terminal

i cant use wall command because all the people in group should not receive the message
I assume that you only want a particular group to receive the message. Do:

[B]man wall

Read about the -g option which allows you to broadcast to a specified group.

Hope this helps.
# 4  
Old 11-08-2006
Quote:
Originally Posted by gilberteu
I assume that you only want a particular group to receive the message. Do:

[B]man wall

Read about the -g option which allows you to broadcast to a specified group.

Hope this helps.
Thanks gilberteu for the wall -g command but

I do not want to send to every one in group
any how

who | grep -E "user1|user2|user3" | tr -s " " ""| cut -f 2 -d " " > temp

gave all the terminal the required users logged on to and then

cat Temp | while ln=`line`
do
echo "Message to Send" | tee /dev/$ln
done

sends the message to all required terminal

tee /dev/pts/15 send message to person logged on pts/15

Thanks zazzybob
the tee was quite helpful
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to write a UNIX script to send a mail to the respective individual users about their groups?

Hi Team, I got a requirement to send a mail to the individual users of a unix server about their respective groups. can some one help me to provide the script as I am unable to write that. I tried with below lines but I come out with errors. cat /etc/passwd | awk -F':' '{ print $1}' |... (6 Replies)
Discussion started by: harshabag
6 Replies

2. Solaris

samba read write access to owner and no access to other users

Hi All, I want to configure samba share permission so that only directory creator/owner has a read and write permission and other users should not have any read/write access to that folder.Will that be possible and how can this be achieved within samba configuration. Regards, Sahil (1 Reply)
Discussion started by: sahil_shine
1 Replies

3. Shell Programming and Scripting

unable to return multilple values in perl

hello friends, i have written one perl script.Which opens a file and search for some parameter's value and gets the status of these parameters. but while i am trying to return these value always i am getting false. Can any one please help me.. here is that function: =======================... (5 Replies)
Discussion started by: harpal singh
5 Replies

4. IP Networking

read/write,write/write lock with smbclient fails

Hi, We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies

5. Solaris

Sending Messages to Users

How can I send messages to users who are logged in unto the server with Solaris 9 OS without going into the application? (3 Replies)
Discussion started by: rahmantanko
3 Replies

6. Solaris

giving write access to selective users to a certain directory in solaris 10

Hi all, how can i grant write access to a selective users only with write access to a certain filesystem/directory in solaris 10. Please help..i tried "fs setacl"...does not seem to work Please adv..thanks in advance... (4 Replies)
Discussion started by: cromohawk
4 Replies

7. Cybersecurity

file permission/acl: 2 users with write access on 1 file...

Hello, i need some help/advice on how to solve a particular problem. these are the users: |name | group | ---------- --------------- |boss | department1 | |assistant | department1 | |employee | department1 | |spy | department2 | this is the... (0 Replies)
Discussion started by: elzalem
0 Replies

8. UNIX Desktop Questions & Answers

Wall, Write, select users, pipe a text file, HELP Before I'm Bald!

OK... I'm fairly new to unix having the admin handed to me on a platter w/almost no training. However, being a programmer, I do pick up things fairly easily, but this one is getting the best of me. I have a unix server that runs multiple versions of the same ERP system, hand crafted for our... (1 Reply)
Discussion started by: chimodel
1 Replies
Login or Register to Ask a Question